Dependent() - how many times it's supposed to be called?
Dependent() - how many times it's supposed to be called?
Vyacheslav
Posts: 70Questions: 27Answers: 0
in Editor
I have created an example http://live.datatables.net/monujadi/1/edit (open console to see a log), the editor form has three dropdowns dependent on each other. When you open the edit window first time, the first dropdown fires once and the second three times. When I select the first value, the second dropdown is triggered twice. Is this bug or normal behavior?
This discussion has been closed.
Answers
Although the behaviour is a little annoying as it is - it is actually expected. What is happening in the case of the third select list is that its value is being set by the value from the row's data on the first pass, then by the action for the dependent link on the second select and finally from its own.
I realise this is a pain, so yes it is a bug in that sense, but it isn't in that this is how is currently works. Cascading dependencies like this are absolutely an area I hope to improve in future.
Allan
Ok ... I hope the future will come soon )