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

Click buttons to change widget #10794

Closed
SindreLindahl opened this issue May 15, 2024 · 3 comments
Closed

Click buttons to change widget #10794

SindreLindahl opened this issue May 15, 2024 · 3 comments
Assignees
Labels
question generic question

Comments

@SindreLindahl
Copy link

SindreLindahl commented May 15, 2024

Hi, I am working on a dashboard which has a list of buttons on top row to show different dashboard states. One of these states show a table (left side) and 2nd list of buttons (right side) with a 2nd widget beneath it. Is it possible to have these buttons change/replace the right widget?

image

I think state can't be used here because it's already reserved for the top buttons? Is there some way to store this additional "state" and change the widget accordingly? I have fiddled with widget html and ngIf, so could possible change widget that way. But how to trigger and save that "state" from button click? Thanks in advance for any help.

@ashaforost
Copy link
Contributor

Hi @SindreLindahl

You can set multiple state entities from widget actions using the 'State entity parameter name' option. Basically, you're creating several state objects, each with a unique name, which you can use in your entity from dashboard state entity alias.

Here's an example:

image
image

@ashaforost ashaforost assigned ashaforost and unassigned Ultrazombie May 15, 2024
@SindreLindahl
Copy link
Author

Thanks, I'll try that!

@ashaforost
Copy link
Contributor

I'm closing this issue due to inactivity. Feel free to reopen if you still have some questions.

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

No branches or pull requests

3 participants