Skip to content
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

value and label switched in tags field #2836

Closed
3 of 8 tasks
pjmuller opened this issue Jun 4, 2024 · 0 comments · Fixed by #2888
Closed
3 of 8 tasks

value and label switched in tags field #2836

pjmuller opened this issue Jun 4, 2024 · 0 comments · Fixed by #2888
Assignees
Labels
Bug Something isn't working

Comments

@pjmuller
Copy link

pjmuller commented Jun 4, 2024

Describe the bug

In the tags field using fetch_labels

  1. In the form: you display the value in the i.s.o. the label
  2. If there are multiple values you collapse them
  3. in the index/show: you display the object literal

Steps to Reproduce

Expected behavior & Actual behavior

Show label in edit / show

Models and resource files

Resource

field :abc, as: :tags,
            fetch_values_from: "/my_endpoint",
            fetch_labels: -> {
                [{label: "hello world", value: "123" }] # displays 123 in form, and object literal "{label: hello world, value: 123}" in show
                # [label] # displays nicely in show / form but on submit only send the labels
            },

System configuration

Avo version: 3.8.0

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

  • Yes. If so, please post code samples.
  • No

Screenshots or screen recordings

FORM:
single value
Screenshot 2024-06-04 at 16 55 29

multiple collapsed
Screenshot 2024-06-04 at 17 20 06

SHOW:
Screenshot 2024-06-04 at 16 56 55

See screen recording https://www.loom.com/share/1f001c090f8c42ea825d2737abca2d09

Impact

  • High impact (It makes my app un-usable.)
  • Medium impact (I'm annoyed, but I'll live.)
  • Low impact (It's really a tiny thing that I could live with.)

Urgency

  • High urgency (I can't continue development without it.)
  • Medium urgency (I found a workaround, but I'd love to have it fixed.)
  • Low urgency (It can wait. I just wanted you to know about it.)
@adrianthedev adrianthedev added the Bug Something isn't working label Jun 7, 2024
@adrianthedev adrianthedev moved this to Next up in Issues Jun 7, 2024
@Paul-Bob Paul-Bob moved this from Next up to In Progress in Issues Jun 21, 2024
@Paul-Bob Paul-Bob moved this from In Progress to In Review in Issues Jun 25, 2024
@Paul-Bob Paul-Bob moved this from In Review to In Progress in Issues Jun 27, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants