-
-
Notifications
You must be signed in to change notification settings - Fork 573
Add enter_pressed option to TextInput #6593
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6593 +/- ##
==========================================
+ Coverage 81.54% 82.95% +1.41%
==========================================
Files 314 313 -1
Lines 46453 46127 -326
==========================================
+ Hits 37879 38265 +386
+ Misses 8574 7862 -712
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
| self.value = event.value_input | ||
| self.value_input = event.value_input |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking about using param.discard_events for these two.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think that'll work since it'll suppress the subsequent change event as well since at that point the value won't changed. Events generally are processed before any value change and if we set it here then that rule is violated but I get that the values have to be set before the event.
|
I'm not entirely sure why test_active in panel/tests/chat/test_interface.py is failing after I sub-classed |
|
It's because ChatAreaInput inherits from TextAreaInput, which is now However, the tests should check if it's ChatAreaInput not TextInput. I'll create a separate branch. |
|
I'm okay with the naming but changing the class hierarchy is technically an API change as you discovered in the chat interface. Maybe add a note about that to the changelog. |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This adds a counter to the number of times the enter key has been pressed. You can then watch this parameter, and you can make TextInput behave like a search bar.
TODO:
Maybe add it to, not needed because we use it as an event._busy__ignore