2015-05-21 68 views
2

當您輸入新值並在沒有輸入空格或逗號的情況下單擊select2時,文本消失......這對於前端用戶來說有點令人困惑。如果它具有新的值,它應該自動創建爲模糊標籤。select2>在模糊中無法使用4.0.0版本的select2標籤創建

$("#cccc, #bccc").select2({ 
    tags: true,  
    multiple: true, 
    selectOnClose: true, 
    tokenSeparators: [",", " "] 
}); 

當我加入selectOnClose:真,(在3.3版本中,它是selectOnBlur:真)似乎有一種循環發生錯誤的最後版本4.0.0

謝謝!

+0

[這是Select2 4.0.0中的一個已知錯誤。](https://github.com/select2/select2/issues/3169) –

回答

3

在select2 4.0.0中,當selectOnClosecloseOnSelect(默認爲true)均被設置爲true時,出現無限循環。見Kevin的評論。此問題已被resolved in select2 4.0.1(查看錯誤修復)。

相關問題