Combos are beasts. Beasts for developers (400 lines of ugly configuration) and beasts for customers.
For some business logic, you may not select some elements. What to do in these cases?
If you do not put unselectable items in the combo, your customers will say you: “Why can’t I see raspberries in the list? I’m sure I added them to the system“.
And if you put everything in the combo, they will say you “Oh, that’s too much, why do I see all this useless stuff?“.
But wait for a moment, we already solved this problem 20 years ago in menus!
In the menu of an application you see everything, but you can select only some items.
This plugin replicates this behaviour: it grays out unselectable items. And since it is simple to do in ExtJS, it providesĀ a qtip with the reason of that status.
You just need to provide a little more detailed store. In this example we have:
{
'id': 2,
'label': 'Raspberries',
'banned': true,
'banReason': 'Not available in this season.'
}
Play with the example or download the sources. And last but not least, thanks to Gianluca for the idea.
ho provato a portare il plugin a ExtJS 4
https://github.com/steeeveb/BannedComboItems
spero possa essere utile anche a te ora che la 4 sta diventando *quasi* usabile
ciao!