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

spike: fix component.setValue inside data-items #2705

Closed
wants to merge 1 commit into from

Conversation

jfmcquade
Copy link
Collaborator

@jfmcquade jfmcquade commented Jan 13, 2025

PR Checklist

  • PR title descriptive (can be used in release notes)

Description

Investigation around #2704.

Allows a toggle bar inside a data items loop to set its own value.

Git Issues

Closes #

Screenshots/Videos

debug_toggle_bar

Screenshot 2025-01-13 at 16 59 16 Screenshot 2025-01-13 at 16 59 45

@chrismclarke
Copy link
Member

Interesting, yes you're right, because the data_items are detached from the parent container, the templateRowMap has no awareness of them and so can't respond to set_local actions correctly.

Ideally we would probably want to intercept those set_local actions within the loop and convert them to set_item, however doing so would also mean having to reverse-engineer what property the component is reading from the item loop when assigning a value. So for now I think just ignoring the set_local action is fine, relying on the data_items list as source of truth.

I think probably better to handle this from data_items component itself, I've opened up #2706 to do so and will close here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants