Reputation: 1476
I added the close icon to the combo box list items clicking on the cloes icon it show undo at the place of close icon for 3 seconds. After 3 seconds the list item should delete from the list. if usesr click on the undo it should not delete. here with i am attaching the code :
Ext.define('ezdi.view.SaveSearchComboboxView', {
extend : 'Ext.form.field.ComboBox',
alias : 'widget.saveSearchComboboxAlias',
queryMode : 'local',
id : 'saveSearchComboId',
store : 'SaveSearchComboboxStore',
emptyText : 'Saved Searches',
displayField : 'searchQueryName',
valueField : 'searchQueryId',
lazyInit: false,
listeners : {
focus : function (combo) {
combo.expand();
}
},
listConfig : {
getInnerTpl : function (displayField) {
return '<span style="float:right;"><button width:16px height:16px; class="savedSearchRemove">x</button><button width:16px height:16px; style="display:none;" class="undoSearchRemove">Undo</button></span>{' + displayField + '}';
}
}
});
For better understanding i have attached clip here
Upvotes: 1
Views: 1935
Reputation: 15673
Upvotes: 2