PDA

View Full Version : form.MultiSelect clear Values on single selection click



ci11111
27 Mar 2012, 4:29 AM
How to customize a Ext.ux.form.MultiSelect, to have this feature:
I need to clear any selection when I click again on it, even if it's a single selected item.
Maybe can be done with a listener and clearValues if (selection.length==1 && selection.index==index)

I would like like also the "simpleSelect: true", of panel.table, that allows you to multiselect, just by clicking other items, (without holding Shift)

skirtle
27 Mar 2012, 5:50 AM
If you take a look at the source for MultiSelect you'll see that it's really just a wrapper around BoundList. BoundList has most of the features you need built-in but there's no way to configure them in a MultiSelect. I suspect you'd have to override onRender to get what you want, which is pretty nasty but relatively straightforward.

ci11111
27 Mar 2012, 5:55 AM
what about patching ux/form/multiselect

I would really need, (would be one less button) , to have the clear all fields, if we click a single selected item

which is prevented by default