-
Notifications
You must be signed in to change notification settings - Fork 85
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
openOnFocus Option Ineffective #1828
Comments
Can you please include an example app showing how you're using *Edit: please include the code for an example app |
My example is live at https://realdealfinder.shinyapps.io/real-deal-finder/ EDIT: updated this live example to include |
Thanks, but what I really need is the source code, which I can't access from the deployed app. |
Ah sorry, here you go:
https://github.com/stevenae/radarchart/blob/main/app.py
…On Thu, Jan 23, 2025, 3:25 PM Garrick Aden-Buie ***@***.***> wrote:
Thanks, but what I really need is the source code, which I can't access
from the deployed app.
—
Reply to this email directly, view it on GitHub
<#1828 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFZOHLCSG23LNN542CHL7T2MFF4PAVCNFSM6AAAAABVYBOU62VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJQHE2DMNRWGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Here's a small app (view on shinylive): from shiny.express import input, render, ui
ui.input_selectize(
id="selectize",
label="Homes to compare:",
choices=["A", "B", "C", "D", "E", "F"],
multiple=True,
options={
"placeholder": "Click here to enter address",
"closeAfterSelect": True,
"maxOptions": 3,
"openOnFocus": False,
},
)
@render.code
def txt():
return input.selectize() It turns out that |
Ah, okay. Thank you! Is it worth opening a feature request for the
`"openOnFocus": False` clicking behavior?
…On Fri, Jan 24, 2025, 9:08 AM Garrick Aden-Buie ***@***.***> wrote:
Here's a small app (view on shinylive
<https://shinylive.io/py/editor/#code=NobwRAdghgtgpmAXGKAHVA6VBPMAaMAYwHsIAXOcpMAMwCdiYACAZwAsBLCbDOAD1R04LFkw4xUxOmTERUAVzJ4mQiABM4dZfI4AdCPp0YuCsgH0WcADZxCZDgC84ACn1N3YtQF5dYSzbtHOF88Nw8rKAAjax8wAAlGYSYyYiYSCSghRBCw90I2Yg5CYS9gXwBBEKZfACEq3wBherAAEWaAUWaAMV8AXVCIDyYYeSt7VBsvABU6eTgBoeJUe1IWLxBcoeqwCahigqsNOl9EbYarIoBrJjZNOGTUygo6Jig1NSERHMGt919CKzESzlGjPADK1lsZBOTBmcwWv22MCgfAA8ssOKsYQBmBG-XxLSioiBdYiEeQsGFdKBWSx4pgAXwGAEp9GyIAABVRHDAkDT6DQ0ZJ8MjOZnZH7uIRkeR0QYmRQYfxQoJi-RgBm9IA>
):
from shiny.express import input, render, ui
ui.input_selectize(
id="selectize",
label="Homes to compare:",
choices=["A", "B", "C", "D", "E", "F"],
multiple=True,
options={
"placeholder": "Click here to enter address",
"closeAfterSelect": True,
"maxOptions": 3,
"openOnFocus": False,
},
)
@render.codedef txt():
return input.selectize()
It turns out that openOnFocus *does work*, just that it means *keyboard
focus*. Clicking on the input always opens the dropdown, but if you have openOnFocus:
false and navigate to the input via the keyboard, the dropdown doesn't
open.
—
Reply to this email directly, view it on GitHub
<#1828 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFZOHPJJRRUWZKFSHX47SD2MJCO5AVCNFSM6AAAAABVYBOU62VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJSGYYTONBUGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Oh, actually, I think we might be doing something that's causing the click to expand the dropdown. I made a small vanilla js/html example and the click doesn't expand the dropdown when We'll look into this, thanks for opening the issue! |
...oops, I have to take that back. |
Okay. I hate to ask since you have been so helpful but, since you have
already done the research, would you open (or would you help me open) a
ticket against selectize regarding this?
…On Fri, Jan 24, 2025, 9:25 AM Garrick Aden-Buie ***@***.***> wrote:
...oops, I have to take that back. openOnFocus: false suppressed opening
the dropdown for click events in selectize 0.14.0 and that behavior changed
somewhere between then and the latest release, v0.15.2, which we use. So
this is primarily an upstream bug in selectize.
—
Reply to this email directly, view it on GitHub
<#1828 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFZOHKGVVLKUDVK6B4GUAL2MJEOFAVCNFSM6AAAAABVYBOU62VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJSGY2TMMBUGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Python ShinyExpress, developing locally. I am using
ui.input_selectize
. By default, an initial click into the selectize box shows the items dropdown. The selectize documentation shows the optionopenOnFocus
, a boolean, for accomplishing this: https://selectize.dev/docs/usage.When I add this to the
options
dict in myui.input_selectize
initialization, the behavior does not change.The text was updated successfully, but these errors were encountered: