Skip to content
This repository has been archived by the owner on Mar 2, 2023. It is now read-only.

Property inspector dynamic content #5

Open
NijsJonas opened this issue Sep 28, 2020 · 5 comments
Open

Property inspector dynamic content #5

NijsJonas opened this issue Sep 28, 2020 · 5 comments

Comments

@NijsJonas
Copy link

Hi all,
i am creating a streamdeck plugin in javascript with two buttons, one to login to our api and one to send specific commands to it.
The login button works fine, i can login and retreive a token from our api.
Now once logged in i need to change the options in the select list of button 2 to all the options that are retreived from the api.

How can i dynamicly add and remove options from a list in a buttons property inspector ?

@tiptronic
Copy link
Contributor

Just use Javascript and HTML, as you would do in a browser...

@NijsJonas
Copy link
Author

ok, but how do i change the html of the property inspector live when a button is pressed on the streamdeck

@tiptronic
Copy link
Contributor

If you get the keyUp or keyDown event from the button, send some message (anything you like) to the property inspector using the sendToPropertyInspector API, grab it in the property inspector and update the DOM.
That's it

@NijsJonas
Copy link
Author

sendToPropertyInspector("test") returns an error, it says its not defined,
do you have an example i can see ?

@tiptronic
Copy link
Contributor

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

No branches or pull requests

2 participants