Input component triggering when hitting enter
Is there support for a on_enter or something (similar to on_blur, etc) for the input component?
My desired UX is a user types something, hits enter, and then that triggers some action - is that possible?
We don't have an on enter trigger as of not but could potentially add this in the future. It is possible to add
I think we may need to have to make some sort of pc.form component - then we can do it the same way as React by wrapping your pc.input in a form: https://reactjs.org/docs/forms.html
Yes we need a on_enter callback to build better user experience.
Or someway to bind a keydown event on the input box? I know the enter key is code 13, and when we detect this, send a event to the backend.
There is an on enter callback adding this for the next release.
Just checking in on the status here. Looks like get_controlled_triggers still only includes {"on_change", "on_focus", "on_blur"}. Is someone working on on_key_press or something like this already?
Not yet - I'll add this to the next milestone
Thanks. Hopefully not too onerous.