-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Radio button from bread doesn't show the selected value if "0" (zero) is selected #5221
Comments
We don't know the value inside your database. |
Yes it works
Il giorno mer 10 feb 2021 alle 12:44 Christoph Schweppe <
notifications@github.com> ha scritto:
We don't know the value inside your database.
Does it work when you add an entry?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#5221 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK7AUVJDNIZNQSRQKPSUS73S6JWSFANCNFSM4XMW66CQ>
.
--
Cosimo Elefante
ell: +39 392 15 47 100
mail: miele123@gmail.com
|
Probably something to do with the use of empty here: I'm wrapping my head around that check 🤣 I think something like this should do the same job: $selected_value = old($row->field, $dataTypeContent->{$row->field} ?? null); @kappafix Can you try and let us know if that works? |
We still don't know what the value in the database is when you edit an entry. |
The value in the database is "0" zero when it doesn't work. The db field is "INT", default value of the db is "0". I could change the value of radio, if set 1 I see it selected when I access it again. If I set the value by the radio it changes to zero into the the db, but when I reopen my record from bread for editing it seems not selected. |
@emptynick , @MrCrayon mrcr |
@emptynick the problem is this is false when the value is zero: @kappafix you can override the view in your project creating this file: |
Many thanks @MrCrayon , I found it after your indications.
|
@kappafix that looks even worse than before 🤣 |
Removed some insanity and simplified with _new_ null coalescing operator. Fixes thedevdojo#5221
Removed some insanity and simplified with _new_ null coalescing operator. Fixes #5221 Co-authored-by: Christoph Schweppe <info@cschweppe.de>
This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group. |
Version information
Description
Radio button from bread doesn't show the "selected" value if "0" (zero)
"Optional Details" of the radio button
{
"default": "0",
"options": {
"1": "Attivo",
"0": "Draft"
}
}
Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
The radio button should be selected
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: