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

Message don't works with combined with repeater #43

Closed
lincoln2491 opened this issue Jun 26, 2023 · 4 comments
Closed

Message don't works with combined with repeater #43

lincoln2491 opened this issue Jun 26, 2023 · 4 comments

Comments

@lincoln2491
Copy link

I tried to use the 'repeater' component with the 'message' component inside. My goal is to set the visibility of the message based on variables in the state dictionary, but it doesn't work.

I have attempted different approaches to set the visibility, but none of them have worked.

I have attached the full code for reproduction.
test.zip

@eliorc
Copy link

eliorc commented Jun 27, 2023

Can confirm, I too try to set the visibility using custom attributes and fail.

This is my element structure, at the bottom are the buttons which their visibility cannot be set using custom attribute
image

@ramedina86
Copy link
Collaborator

Hi both, thanks for reporting this.

It's technically expected behaviour, as right now Visibility requires a state element (which is different from a context element generated by a Repeater).

That being said, you made me realise that it was a significant and unnecessary limitation, plus potentially confusing. I've changed this to accept both state and context and will release it in the new version.

@lincoln2491
Copy link
Author

Hi @ramedina86

Thanks for the help and info. Wish you good luck in future works with streamsync :)

@ramedina86
Copy link
Collaborator

This was updated in the latest release 0.1.9, which accepts both state and context (i.e. item and itemId from Repeater). Thanks for bringing this up.

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

No branches or pull requests

3 participants