- Home
- Forum
- JavaScript - EJ 2
- How to make disable items unsortable?
How to make disable items unsortable?
Hi,
i use the ListBox as DualListBox and one of the lists contains disabled entries. The deactivated entries should not be sortable, so that it always stays on the same position. I have prepared a stackblitz for this:
For example:
If I select Cameroon and click on MoveUp button, it should swap the position with Bermuda. The same behaviour should be present when dragging and dropping the element.
or
If I select Italy, the MoveUp button from the right list should be disabled.
SIGN IN To post a reply.
4 Replies
AK
Akcherry
March 17, 2020 09:42 AM UTC
There is also an error, if you move all the enabled items.
Error in /turbo_modules/@syncfusion/[email protected]/dist/ej2-dropdowns.umd.min.js (10:240450)
Cannot read property 'classList' of undefined
Another expected behavior is, if you click on a moveAll button, the disabled items should be not moved.
AD
Arunkumar Devendiran
Syncfusion Team
March 18, 2020 06:19 PM UTC
Hi Akcherry,
Thanks for your patience.
Query1: If I select Cameroon and click on MoveUp button, it should swap the position with Bermuda. The same behaviour should be present when dragging and dropping the element.
We have checked your reported query and we have created the sample for your reported requirement. In that, we have move up the list item before the disabled items and move down the list item after the disabled items. Please refer the below sample link.
Sample Link:
Query2: Another expected behavior is, if you click on a moveAll button, the disabled items should be not moved.
We need to validate on this issue, and we will update the further details on March 20,2020.
Regards,
Arunkumar D
AK
Akcherry
March 19, 2020 08:25 AM UTC
Hi Arunkumar,
thank you for your reply. But that's not really what I'm looking for. The approach with the onActionBegin can still help me.
Please check this error, which occurs when you move the last enabled item, an attempt is made to select a disabled item.
AD
Arunkumar Devendiran
Syncfusion Team
March 25, 2020 03:48 PM UTC
Hi Akcherry,
We have checked your reported issue and we are able to reproduce it in our end. We have considered this as a defect in our end and fix of this issue will be included in our volume 1 release and appreciate your patience until then. Please follow the below feedback link,
Feedback Link:
Regards,
Arunkumar D
SIGN IN To post a reply.
- 4 Replies
- 2 Participants
-
AK Akcherry
- Mar 16, 2020 09:02 AM UTC
- Mar 25, 2020 03:48 PM UTC