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

Fire state changed events #11

Merged
merged 9 commits into from
Jun 14, 2021
Merged

Fire state changed events #11

merged 9 commits into from
Jun 14, 2021

Conversation

bramkragten
Copy link
Member

No description provided.

src/provision-dialog.ts Outdated Show resolved Hide resolved
@bramkragten bramkragten marked this pull request as ready for review June 14, 2021 15:27
@bramkragten bramkragten changed the title WIP Fire state changed events Fire state changed events Jun 14, 2021
@@ -17,5 +19,8 @@ export const startProvisioning = async () => {

const el = document.createElement("improv-wifi-provision-dialog");
el.device = device;
el.stateUpdateCallback = (state) => {
fireEvent(button, "state-changed", state);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make detail an object so we can expand it while remaining backwards compatibility.

Suggested change
fireEvent(button, "state-changed", state);
fireEvent(button, "state-changed", { state });

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is an object, stateUpdateCallback receives an object.

@balloob
Copy link
Contributor

balloob commented Jun 14, 2021

Don't forget to update the README.

@balloob balloob merged commit 43b018c into main Jun 14, 2021
@balloob balloob deleted the fire-state-changed-events branch June 14, 2021 16:56
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.

None yet

2 participants