possible regression with Editor.dependent() 1.6.1
possible regression with Editor.dependent() 1.6.1
This is related to https://datatables.net/forums/discussion/38027/use-of-options-instead-of-dependant
At least my code has regressed. Not sure if I was doing something nonstandard or not to cause this. I am sending you credentials by email so you can access http://sandbox.scoretility.com/raceresultservices
In this page with Editor 1.5.5, when clicking New, the first select would have values from http://sandbox.scoretility.com/servicecredentials Service Name field, through retrieving by ajax.
In 1.5.5, dataTables.editor.js code starting at line 2260 fires, but in 1.6.1 code starting at 2446 does not.
Because of the way my code is structured it's inconvenient for me to have both releases running at the same time. Let me know if I need to put 1.5.5 online for you to compare behavior.
Replies
It would appear that there is an incompatibility with Selectize and how Editor 1.6 handles the
dependent()
method. Selectize doesn't appear to allow the change event to bubble up the DOM, which is stopping Editor from seeing it.Could you try adding:
to the Selectize plug-in please? I think that should resolve the issue.
Allan
Hmm. I pull selectize from a cdn. Is there a way to patch this externally? I can probably figure it out, but I figure while I have your attention...
Thanks for the quick response.
(checking) Is it just
before editor fieldtype selectize is pulled in?
I can put this on my sandbox if you need it, but from development when I patch as such, I get undefined error for conf at line 2857 of selectize from another view on initialization
Note at line 2857, selectize is calling focus with no parameters from within
open()
and from http://sandbox.scoretility.com/raceresultservices when I focus on the selectize
Also not sure if you want to override default selectize focus behavior
Sorry, now I see your meaning was to edit FieldType-Selectize plugin. I will make this update and put on sandbox in a couple of hours. Trying to do now before I run, but am having some difficulty which I can't debug right now.
I spent a little more time, and was able to debug my problem. Unfortunately adding the focus method to FieldType-Selectize did not resolve the original problem. See http://sandbox.scoretility.com/raceresultservices
Darn - it got 90% of the way there. In the Editor Javascript could you also change:
to be:
Sorry I haven't been able to check this. Normal service resumed in the early new year .
Allan
Sorry not quite there yet. Did I patch this correctly? Note this is not urgent, and if it needs to wait until you have more time, that will be fine. This can be seen at http://sandbox.scoretility.com/raceresultservices
You did - my code was in error - sorry!
I forgot what the return type from the
field().node()
method was.Allan
yup, that did the trick.
will that be in 1.6.2?
also will you update FieldType-Selectize plugin so I can download an official version? (too bad these are not available on cdn or with version number, though)
It probably will be, but I'd like to do some regression testing before committing to that. Otherwise there might be a regression of the regression...
Thanks for the feedback on this.
Allan
Thanks. Here is where using git issues to track datatables problems would be helpful, as I could link my issue https://github.com/louking/rrwebapp/issues/301 to yours and would know when to take the new release.
But I understand you have a process, that these forums are very searchable, and that having issues as well divides where information is available.
When this is fixed, would you be coming back to this thread to indicate as such?
Yes - I'll update this thread when I've committed the fix.
Allan
I've finally gotten around to this - way later than expected - sorry!
The line I suggested above did indeed cause other issues. This is the one I've committed:
Basically a change event caused by something inside the field's container will trigger a dependent action.
I'm working on the remaining changes for 1.6.2 just now and it shouldn't be that far away.
Regards,
Allan