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

feat: added detectInput #2980

Merged
merged 3 commits into from Oct 16, 2020
Merged

feat: added detectInput #2980

merged 3 commits into from Oct 16, 2020

Conversation

XiNiHa
Copy link

@XiNiHa XiNiHa commented Oct 16, 2020

πŸ”Ž Overview

This PR adds the feature to disable automatic v-model detection.

πŸ€“ Code snippets/examples (if applicable)

Ignoring the v-modeled element and using validate() to validate the second input's value instead.

<ValidationProvider v-slot="{ validate }" :detectInput="false">
    <input v-model="field" type="text"> <!-- not detected -->
    <input type="text" @change="validate($event.target.value)">
</ValidationProvider>

βœ” Issues affected

closes #2979

@codecov
Copy link

codecov bot commented Oct 16, 2020

Codecov Report

Merging #2980 into master will not change coverage.
The diff coverage is 92.30%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2980   +/-   ##
=======================================
  Coverage   95.70%   95.70%           
=======================================
  Files          51       51           
  Lines        1350     1350           
  Branches      329      329           
=======================================
  Hits         1292     1292           
  Misses         58       58           
Impacted Files Coverage Ξ”
src/components/Provider.ts 93.93% <92.30%> (ΓΈ)

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 1522e4e...5ac7568. Read the comment docs.

Copy link
Owner

@logaretm logaretm left a comment

Choose a reason for hiding this comment

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

Great work! Do you mind adding tests for this? Should be similar to the most basic test but instead of checking that error messages are rendered, you would check if they didn't since the input wasn't detected.

@logaretm logaretm changed the title feat: added detectInput closes #2979 feat: added detectInput Oct 16, 2020
@XiNiHa XiNiHa requested a review from logaretm October 16, 2020 01:08
@XiNiHa XiNiHa requested a review from logaretm October 16, 2020 01:29
@logaretm logaretm merged commit 6d7d1c4 into logaretm:master Oct 16, 2020
@logaretm
Copy link
Owner

Great work, thank you!

@logaretm
Copy link
Owner

I tagged 3.4.2 with this

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.

Way to Disable Automatic v-model Detection?
2 participants