Tuesday, July 30, 2013

ExtJS multiselect problem when shift click to select entries


IE  10; ExtJS 4.1


I am using ExtJS "multiselect" control. When trying to select multiple rows using Shift+Click, I'm getting a messy screen (Figure 1). The data behind the scene is correct, but the look is disturbing. Ideally, it should look like Figure 2. 
Figure 1. Screenshot showing the problem

Figure 2. Screenshot showing the expected behavior


Solution to this problem is relatively trivial, but not obvious. Just add the following attribute to the multiselect control, you will get behavior like Figure 2. I found the solution by looking up example hosted on Sencha web site, and found the only difference is in this "ddReorder" attribute. Once it's added, the selection behavior is as expected. Drag drop reorder is harmless for what I am working on.
ddReorder: true 

No comments: