The props for events on ui.text_field are not wired up correctly and do not work, logging an error in the browser console.
Steps to reproduce
Create a ui.textfield with on_focus and on_blur events: tf = ui.text_field(label="Focus me", on_focus=lambda: print("Focus!"), on_blur=lambda: print("Blur!"))
Click in and out of the text field that's shown
Expected results
"Focus!" and "Blur!" should be printed in the python console
Actual results
Nothing is printed to the Python console. An error is logged in the browser logs:
Uncaught (in promise) Error: Converting circular structure to JSON
--> starting at object with constructor 'HTMLInputElement'
| property '__reactFiber$a5vcbx0bdh' -> object with constructor 'nXe'
--- property 'stateNode' closes the circle
at new JSONRPCErrorException2 (eval at <anonymous> (vendor-808b021e.js:1:1), <anonymous>:6719:28)
at JSONRPCClient2.eval (eval at <anonymous> (vendor-808b021e.js:1:1), <anonymous>:6961:43)
at step (eval at <anonymous> (vendor-808b021e.js:1:1), <anonymous>:6868:19)
at Object.eval [as next] (eval at <anonymous> (vendor-808b021e.js:1:1), <anonymous>:6815:14)
at fulfilled (eval at <anonymous> (vendor-808b021e.js:1:1), <anonymous>:6786:24)
Versions
Engine Version: 0.36.1
Web UI Version: 0.90.0
Java Version: 11.0.24
Barrage Version: 0.6.0
Browser Name: Chrome 128
OS Name: Linux
@deephaven/js-plugin-ui: 0.21.0
Need to correctly deserialize the events like we already do for Button/Toggle button. We won't be able to just use useButtonProps though, but perhaps you can break useButtonProps down into a couple of hooks.
Description
The props for events on
ui.text_field
are not wired up correctly and do not work, logging an error in the browser console.Steps to reproduce
ui.textfield
withon_focus
andon_blur
events:tf = ui.text_field(label="Focus me", on_focus=lambda: print("Focus!"), on_blur=lambda: print("Blur!"))
Expected results
Actual results
Versions
Engine Version: 0.36.1 Web UI Version: 0.90.0 Java Version: 11.0.24 Barrage Version: 0.6.0 Browser Name: Chrome 128 OS Name: Linux @deephaven/js-plugin-ui: 0.21.0