How do I set the order of drop-down menus with cascading columns - Part2
How do I set the order of drop-down menus with cascading columns - Part2
Hi,
This relates to the question I posted yesterday: "How do I set the order of drop-down menus with cascading columns?".
Kevin's response was correct, but I also saw another issue. When I choose a name, such as Ashton, and then the related position, I am still given the option to choose another name, such as Test1 or Garrett. Changing the name causes the cascading to break down.
When I choose a Name, the behavior should be to simply keep that choice and prevent the user from selecting any other option in the Name column (just like other drop-downs). similar to https://live.datatables.net/yamifera/9/edit. Note that the values in this example are taken directly from a datatable.
Is this possible?
Here is my code -
https://live.datatables.net/yamifera/14/edit
This question has an accepted answers - jump to answer
Answers
Unfortunately, that isn't how SearchPanes' cascade works at the moment. I agree that it isn't intuitive, and it should be changed. It will be - but I'm not yet certain when!
Allan
Thanks. Is there a way to disable the values on the Name column if one value is selected? Enable only when user selects Reset Filter?
Sorry - no for that as well. It is always enabled.
Allan
Allan, This is not with SearchPanes.
You can get the currently displayed names using the same technique as the regular loop that builds the select list, for example
column.data().unique()
. ChaintoArray()
to make it a Javascript array. Then check to see if the hard coded name is in thecolumn.data().unique()
array. For example:https://live.datatables.net/yamifera/16/edit
Kevin
Oh! Sorry about thank, and that's for the correction Kevin. I saw "cascade" and jumped to a conclusion. That's what I get for rushing on a Friday.
Allan
No problem Allan. Thankyou Kevin very much!!!