Extjs combobox: hide selected value from dropdown list

后端 未结 5 1436
青春惊慌失措
青春惊慌失措 2021-02-15 14:57

I\'m using ExtJS 4 and looking for a way I can hide currently selected value from combo\'s dropdown list?

So instead of this (\"Alaska\" currently selected in combobox):

5条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-15 15:16

    So I used @sra's solution, but with a small modification, to add the content in the right place below the if(!me.hideActive):

    if(me.selectedRecords[0]) {
        me.store.insert(me.selectedRecords[0].index,me.selectedRecords);
    }
    

    That way you just don't add them to the botton. I know it is an old post, but I hope it helps people looking for a solution.

提交回复
热议问题