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

[NumberInput] Hold stepper buttons to continuously change value #161

Closed

Conversation

mj12albert
Copy link
Member

@mj12albert mj12albert commented Mar 7, 2024

Closes #74

TODO

  • make sure the tests are correct
  • longer delay between the first onChange on the first mouseDown and subsequent continuously-firing ones
  • pointer instead of mouse?
  • handle mouse/pointerOut

@mj12albert mj12albert added the component: number field This is the name of the generic UI component, not the React module! label Mar 7, 2024
@mj12albert mj12albert force-pushed the feat/number-input-step-repeat branch from 373312d to 8e1eae6 Compare March 13, 2024 05:17
Comment on lines +34 to +37
clock.tick(100); // onChange x2
clock.tick(100); // onChange x3
clock.tick(100); // onChange x4
clock.runToLast();
Copy link
Member Author

Choose a reason for hiding this comment

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

clock.tick(300) doesn't work because if I don't run the first timer the subsequent ones will never be created

2nd try: I thought this was needed to work:

clock.tick(100)
clock.runToLast();
clock.tick(100)
clock.runToLast();
clock.tick(100)
clock.runToLast();

because I thought if I didn't run it after each 100ms, the timer would get cleared?

@mj12albert mj12albert closed this Mar 18, 2024
@mj12albert mj12albert deleted the feat/number-input-step-repeat branch October 28, 2024 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: number field This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[number field] Pressing and holding the stepper buttons should continuously change the value until released
1 participant