Closed mturoci closed 1 year ago
@mturoci tested on windows, but doesn't seem to work (no prints):
https://github.com/h2oai/wave/assets/6949295/af4596d0-47ca-4e15-bfb7-a377d37f72d6
edit: seems to be another more general issue: q.args is always empty. any idea why? (python 3.11 .. can that be an issue?)
No issues under linux. Def. better than handle_on behavior imho. __wave_submission_name__
is also very handy.
One thing, empty textbox and toggles will still not work (even tho its not directly related to this PR I think)
INFO: 127.0.0.1:55938 - "POST / HTTP/1.1" 200 OK
q.args textbox:'Foo2', #show_inputs:False, show_inputs:False, __wave_submission_name__:'textbox'
textbox works
2023/08/10 19:16:20 * /d2857dc7-5d83-4245-a6c8-c8d197d1edeb {"d":[{"k":"example","d":{"view":"form","box":"1 1 4 -1","items":[{"textbox":{"name":"textbox","label":"Standard","value":"Foo","trigger":true}},{"button":{"name":"#show_inputs","label":"Hash change"}},{"button":{"name":"show_inputs","label":"Submit","primary":true}}]}}]}
INFO: 127.0.0.1:55942 - "POST / HTTP/1.1" 200 OK
q.args textbox:'', #show_inputs:False, show_inputs:False, __wave_submission_name__:'textbox'
2023/08/10 19:16:27 * /d2857dc7-5d83-4245-a6c8-c8d197d1edeb {"d":[{"k":"example","d":{"view":"form","box":"1 1 4 -1","items":[{"textbox":{"name":"textbox","label":"Standard","value":"Foo","trigger":true}},{"button":{"name":"#show_inputs","label":"Hash change"}},{"button":{"name":"show_inputs","label":"Submit","primary":true}}]}}]}
One thing, empty textbox and toggles will still not work (even tho its not directly related to this PR I think)
Yep, didn't manage to add it yesterday. Will do today.
Thanks for the feedback @Far0n!
tested on windows, but doesn't seem to work (no prints):
Interesting, will have a look.
Windows fixed and zip updated in the PR description. @Far0n give it a try please and let me know if all is ok. It should now also include fixed for falsy values not triggering.
Windows fixed and zip updated in the PR description. @Far0n give it a try please and let me know if all is ok. It should now also include fixed for falsy values not triggering.
yep, now both work.
Introduces a new
run_on
that is an alternative to the currenthandle_on
with a more intuitive behavior.Main features
False
or''
- this was a bug in the originalhandle_on
.# routing
to regular interactions (btns, etc.) as well.Testing code
https://github.com/h2oai/wave/discussions/1480 works as expected as well.
linux.zip macosx.zip win.zip
cc @Far0n @vopani @pascal-pfeiffer for feedback
Naming suggestions highly welcome!
Closes #1484 Closes #1008