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

fix: add override for stepper and slider controlled change events #389

Merged

Conversation

alharris-at
Copy link
Contributor

@alharris-at alharris-at commented Feb 9, 2022

Issue #, if available:
N/A

Description of changes:
Stepper primitive takes an onStepChange callback, rather than onChange, and issues a raw number rather than a full SyntheticEvent, adding support for synthetic event names, as well as implementations which are based on the primitive type.

Also updated the SliderField to use the numeric callback, though w/ the name onChange per UI docs.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@alharris-at alharris-at requested a review from a team February 9, 2022 01:42
@codecov-commenter
Copy link

codecov-commenter commented Feb 9, 2022

Codecov Report

Merging #389 (39c31a0) into tagged-release/q1-release (d6acc19) will increase coverage by 0.06%.
The diff coverage is 96.42%.

Impacted file tree graph

@@                      Coverage Diff                      @@
##           tagged-release/q1-release     #389      +/-   ##
=============================================================
+ Coverage                      93.64%   93.70%   +0.06%     
=============================================================
  Files                             43       43              
  Lines                           1636     1653      +17     
  Branches                         352      356       +4     
=============================================================
+ Hits                            1532     1549      +17     
  Misses                           102      102              
  Partials                           2        2              
Impacted Files Coverage Δ
packages/codegen-ui-react/lib/primitive.ts 100.00% <ø> (ø)
...s/codegen-ui-react/lib/react-component-renderer.ts 86.27% <0.00%> (ø)
...eact/lib/react-component-with-children-renderer.ts 95.38% <100.00%> (ø)
packages/codegen-ui-react/lib/workflow/events.ts 93.10% <100.00%> (+1.79%) ⬆️
packages/codegen-ui-react/lib/workflow/mutation.ts 97.87% <100.00%> (+0.28%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d6acc19...39c31a0. Read the comment docs.

@alharris-at alharris-at force-pushed the workflow/syntheticChangeProps branch from 40787f3 to 39c31a0 Compare February 9, 2022 01:49
@alharris-at alharris-at changed the title fix: add override for stepper field controlled change event fix: add override for stepper and slider controlled change events Feb 9, 2022
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.

3 participants