Skip to content

Conversation

@ph-fritsche
Copy link
Member

What:

On user input set the initial value to determine on blur if there are uncommitted changes.

Why:
Closes #917

How:

Set the InitialValue when using setUIValue instead of on focus events.
Clear the InitialValue when the element loses focus.

Checklist:

  • Tests
  • Ready to be merged

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 10, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 299360b:

Sandbox Source
userEvent-dom Configuration
userEvent-react Configuration
rough-shape-dxqxbu Issue #917
strange-benji-0hywms Issue #917

@codecov
Copy link

codecov bot commented Apr 10, 2022

Codecov Report

Merging #918 (299360b) into main (6d36828) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main      #918   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           85        85           
  Lines         1778      1785    +7     
  Branches       657       641   -16     
=========================================
+ Hits          1778      1785    +7     
Impacted Files Coverage Δ
src/document/index.ts 100.00% <100.00%> (ø)
src/document/interceptor.ts 100.00% <100.00%> (ø)
src/document/value.ts 100.00% <100.00%> (ø)
src/keyboard/keyboardAction.ts 100.00% <100.00%> (ø)
src/options.ts 100.00% <100.00%> (ø)
src/pointer/pointerAction.ts 100.00% <100.00%> (ø)
src/utils/edit/input.ts 100.00% <100.00%> (ø)
src/utils/misc/wait.ts 100.00% <100.00%> (ø)

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 8bc3310...299360b. Read the comment docs.

@ph-fritsche ph-fritsche merged commit 7b0643b into main Apr 11, 2022
@ph-fritsche ph-fritsche deleted the fix-917 branch April 11, 2022 08:01
@github-actions
Copy link

🎉 This PR is included in version 14.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

selectOptions triggers change twice

2 participants