-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
[Bug]: Boolean control in true
state in URL is ignored
#25035
Comments
JReinhold
changed the title
Boolean control leads inversive in URL
[Bug]: Boolean control in Nov 29, 2023
true
state in URL is ignored
I can confirm this bug exists. Query string parameters seem to be negating boolean values by using !true and !false
|
there is a workaround we can use which is kind of silly but it works: {
options: ["true", "false"],
mapping: { true: true, false: false },
description: "arg description",
control: {
type: "select",
labels: { true: "Enabled", false: "Disabled" },
},
}, You just have to change the default value for the arg from |
This was referenced Dec 25, 2023
vanessayuenn
moved this from Empathy Backlog
to Empathy - Ready for work
in Core Team Projects
Feb 6, 2024
same issue as #23623 |
8 tasks
8 tasks
github-project-automation
bot
moved this from Empathy - Ready for work
to Done
in Core Team Projects
Feb 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Discussed in #25034
Originally posted by khats November 29, 2023
Summary
When a boolean control is
true
it is correctly written to the URL, however when reloading the browser the query parameter is ignored and the boolean is converted back to false again. The same happens when you attempt to open the preview iframe.Reproduction
undefined
state: https://next--635781f3500dd2c49e189caf.chromatic.com/?path=/story/blocks-controls-boolean--undefinedfalse
and reload. See that it correctly staysfalse
.true
and reload. See that it is nowfalse
again.The text was updated successfully, but these errors were encountered: