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(NcTextField): don't fire value updating events twice #6235

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

ShGKme
Copy link
Contributor

@ShGKme ShGKme commented Nov 19, 2024

☑️ Resolves

  • Events are fired twice:
    • Once in @input="handleInput" which results in $emit('update:value', $event.target.value)
    • Once in v-on="$listeners" which equivalent to @update:value="$emit('update:value', $event)"
  • Before v-model compatibility it was only for update:value event. Now also for all the modelValue events

Handling input manually is not needed, it's handled by NcInputField

🖼️ Screenshots

🏚️ Before 🏡 After
image image

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable
  • 3️⃣ Backport to next requested with a Vue 3 upgrade

Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
@ShGKme ShGKme added bug Something isn't working 3. to review Waiting for reviews feature: input-field Covering the InputField, TextField, ... labels Nov 19, 2024
@ShGKme ShGKme added this to the 8.20.1 milestone Nov 19, 2024
@ShGKme ShGKme self-assigned this Nov 19, 2024
@ShGKme
Copy link
Contributor Author

ShGKme commented Nov 19, 2024

Vue 3 works differently, making a separate PR for v9.

@susnux susnux merged commit fdc2322 into master Nov 19, 2024
19 checks passed
@susnux susnux deleted the fix/nc-text-field--duplicated-event branch November 19, 2024 12:12
@Antreesy Antreesy mentioned this pull request Nov 21, 2024
@Antreesy Antreesy modified the milestones: 8.20.1, 8.21.0 Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug Something isn't working feature: input-field Covering the InputField, TextField, ...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants