0
我将如何处理更新select2下拉列表的值?更新select2值
我已经看过这里了,我测试过的东西没有更新,在下拉菜单中更换了数据。 - Update select2 data without rebuilding the control
我将如何处理更新select2下拉列表的值?更新select2值
我已经看过这里了,我测试过的东西没有更新,在下拉菜单中更换了数据。 - Update select2 data without rebuilding the control
对于低于标准写作的道歉,我写了这个,而我累了。然而我注意到这个话题没有任何问题/答案,我终于明白了。
我觉得自己有点像一个schlub,因为没有及时搞清楚。
$('#element').select2().empty(); // empty the select2
$('#element').select2({ placeholder: 'Select A Model', data: data }); // fill the existing select2 with the data