Monday, March 7, 2016

EXTJS: ItemSelector to restrict selections

EXTJS has some wonderful features called MultiSelector and ItemSelector.
These selectors allow the user to select multiple values in a given list of values.

I had a requirement to restrict the number of selected values to 1.

EXT JS has a simple solution for this problem:

In the itemselector xtype, set

 maxSelections: 1  
This above line will help you set the number of values that can be selected in the selector. If the selected number of values does not match the maxSelections value, then validation will fail.

No comments:

Post a Comment