avo-hq / avo

Build Ruby on Rails apps 10x faster
https://avohq.io
Other
1.43k stars 222 forks source link

Key-value field: value "false" is shown blank #2633

Open sedubois opened 3 months ago

sedubois commented 3 months ago

Context

When using the key-value JSON field, an object such as {"key"=>false} is shown with a greyed out Value instead of showing false.

System configuration

Avo version: 3.5.4

Rails version: 7.0

Ruby version: 3.3.0

License type

Are you using Avo monkey patches, overriding views or view components?

Screenshots or screen recordings

Screenshot 2024-03-24 at 21 05 06
github-actions[bot] commented 2 months ago

This issue has been marked as stale because there was no activity for the past 15 days.

github-actions[bot] commented 2 months ago

This issue has been marked as stale because there was no activity for the past 15 days.

github-actions[bot] commented 1 month ago

This issue has been marked as stale because there was no activity for the past 15 days.

github-actions[bot] commented 1 month ago

This issue has been marked as stale because there was no activity for the past 15 days.

adrianthedev commented 1 month ago

Yes, this is a good improvement that the key_value field can receive.

We'll merge a PR if we had one.

Approach

The JS should be able to spot the true false values, render them as such with the "false" text and then, when saved, turn that text back into a boolean false value. Same for true.