New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
typedInput change event incorrect value #2883
Comments
Yes, there's definitely something wrong here - both in the code and the docs. The
But I can also see we were triggering the event incorrectly so the I've fixed that in the code - and will get the docs updated as well. As for the 2 events you mention in the side note - I can't immediately see where that initial event (with |
I tried to set a third argument in my callback but last was alway undefined. Maybe I test only with the type that don't have values. |
I have tracked it down. Once the edit dialog has been built, it automatically triggers the We can probably find a different way of passing that flag so it doesn't show up to 'normal' event listeners, however it will mean the TypedInput change handler is invoked with Another option would be to make this editor code aware of the TypedInput behaviour and get it to do the right thing. I've tried to avoid doing that as it means the behaviour is now coded in two different places and adds an implicit dependency. |
My javascript debugger say it's from this :
|
Yes - that's the code I was talking about in my previous comment |
Yes I saw that after ;) |
Fixed pushed to |
Thanks |
@knolleary , I have the same issue when I register in oneditprepare for change event on the configuration node. Does he use typeinput internally and already fixed or it's an other issue ? |
What are the steps to reproduce?
Create a new node type by using this code;
In the html node definition set this code;
Then run node-red and open the node settings.
What happens?
In the console;
What do you expect to happen?
In the console;
Side note
If I put the
on.change()
beforetypedInput()
I get 2 events, the first one is correct and then the second one the value istrue
.After the initial event, all the next one are correct.
Please tell us about your environment:
The text was updated successfully, but these errors were encountered: