When creating this.el, afterwards add this to make it a normal field:
It will then be x-form-field, and it will have a border!Code:
Thx for the effort you put into implementing a multiselect! :)
Is there any chance we could get an editor for the list entries?
I needed to show an image in the entries itself (css), but on every refresh the entries transformed back to their original html specified in the Multiselect-class.
So, if a user could tell the class which html to use for rendering the cells, the painting of them could respect various states of the selection model, such as "isEditMode" (rendering a textfield), "isSelected", "isDisabled" and so on. If you know the CellEditor-components of Swing, you might know what I'm pointing at. If not, I'd be glad to propose the changes, just let me know (I'm a pure porgrammer and not very trusted with css, so I might request some help here).
tj, nice work. This is really sharp.
Just ran into a bug....check it out, I made a demo page to illustrate the problem...
So the problem is with setValue, it seems to think a partial match is good enough, and selects the first option that matches partially, so if a value of '17' is in the list before '1' and you have setValue('1') it will select '17' instead of '1' which is further down the list.
I think this is because your using the Store's query function which in turn uses createFilterFn which essentially does this....
As you can see, both return true.Code:
>>> value = new RegExp('1', "i");
My regex knowledge is limited, so ill leave it to you guys to figure out a solution to this.
Good find VinylFox I'll look into it.
I just want to thank tjstuart - Brilliant work!,
And one issue I have, prevented me to sleep.
How can I to use 'Ext.ux.Multiselect' as single select?
And another one,
How can I prevent unselecting behavior of this, when click again on same item or on empty space?
Thanks again! to All of u.
Ext.ux.Multiselect/ItemSelector [v2.1] now available.
// 2.1 Fixes 27 Sept 2007
// - General
// - draggable now spelt correctly in all places :)
// - Queries to the store in setValue now match whole value correctly (rather than partial match)
// - ItemSelector
// - value now initialised onRender
The goal of the Multiselect widget was to replicate (as best as possible) the traditional HTML SELECT/MULTIPLE form element.
Can someone please help me? Am not able to load data in my itemSelector. Am able to get my itemSelector but there is no data. I used the same code posted in the example. But still not able to do it.