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

Trigger change is not working with action dispatch-event if there is no delay attribute #536

Open
abdelav opened this issue May 3, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@abdelav
Copy link

abdelav commented May 3, 2023

Using the a behavior change trigger to dispatch an event on <Text-field> element is not working if the behavior doesn't have the delay attribute.

Not working example:

<text-field name="phone" placeholder="Your phone number">
  <behavior trigger="change" action="dispatch-event" event-name="some-event" />
</text-field>

working example:

<text-field name="phone" placeholder="Your phone number">
  <behavior delay="0" trigger="change" action="dispatch-event" event-name="some-event" />
</text-field>
@abdelav abdelav added the bug Something isn't working label May 3, 2023
@adamstep
Copy link
Contributor

adamstep commented May 3, 2023

Let me test this in the demo app, will report back.

@adamstep
Copy link
Contributor

adamstep commented May 3, 2023

@abdelav did you notice this for other behavior actions, or only dispatch-event?

@abdelav
Copy link
Author

abdelav commented May 3, 2023

I just tested with dispatch-event so far, but let me test with other actions an I will report back.

@adamstep
Copy link
Contributor

adamstep commented May 3, 2023

I just tried it in the demo app and couldn't reproduce with dispatch-event: https://github.com/Instawork/hyperview/compare/adam/test-event1?expand=1

Simulator.Screen.Recording.-.iPhone.14.-.2023-05-03.at.16.41.14.mp4

@abdelav
Copy link
Author

abdelav commented May 3, 2023

ok, this is probably an internal issue then?

@adamstep
Copy link
Contributor

adamstep commented May 3, 2023

Perhaps, message me privately with the issue so we can check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants