Skip to content

UIs: fix "deprecated native modifier on v-on directive" (Vue3 MUST FIX) #14355

Open

Description

@severinbeauvais

Example:

warning: '.native' modifier on 'v-on' directive is deprecated (vue/no-deprecated-v-on-native-modifier) at src/views/Dashboard.vue:150:26:
  148 |                   v-if="!isHistorical"
  149 |                   :disabled="hasBlocker || !isAllowed(AllowableActions.VIEW_CHANGE_COMPANY_INFO)"
> 150 |                   @click.native.stop="goToChangeFiling()"
      |                          ^
  151 |                 >
  152 |                   <v-icon small>mdi-pencil</v-icon>
  153 |                   <span>Change</span>

Ref: https://eslint.vuejs.org/rules/no-deprecated-v-on-native-modifier.html

Ref: https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html

Activity

  1. severinbeauvais commented on Jul 21, 2023

    @severinbeauvais
    CollaboratorAuthor

    I don't know how to fix this so it needs to be researched and then fixed in code for all projects that have this issue, including:

    1. Create UI
    2. Edit UI
    3. Filings UI
    4. Namerequest UI
    5. BCRS Shared Components
    6. Auth Web

    ^^ If the above cannot be done within the estimate of this ticket then please create new ticket(s).

  2. self-assigned this
    on Jul 28, 2023
  3. changed the title [-]UIs: fix "deprecated native modifier on v-on directive"[/-] [+]Must fix Vue3 - UIs: fix "deprecated native modifier on v-on directive"[/+] on Aug 1, 2023
  4. leodube-aot commented on Aug 2, 2023

    @leodube-aot
    Collaborator

    The .native modifier is not deprecated in Vue2 however the linter is throwing warnings for using it because we are using some Vue 3 features. We will need to remove .native modifiers as part of the migration to Vue 3 (see: https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html). The fix should be as simple as removing the modifier without any extra changes. I tried this in a couple existing repos that are still on Vue 2 with mixed success. Removing the .native modifier in Vue 2 mostly worked as expected but I ran into a few cases where the “click” event was not getting registered. Rather than do a partial fix I will move this back into the backlog to be completed as part of the Vue 3 migration. If the linter warnings become annoying we can always ignore the rule.

  5. removed their assignment
    on Aug 2, 2023
  6. severinbeauvais commented on Aug 2, 2023

    @severinbeauvais
    CollaboratorAuthor

    Excellent analysis and reporting. I agree with your recommendations. Thanks!

  7. changed the title [-]Must fix Vue3 - UIs: fix "deprecated native modifier on v-on directive"[/-] [+]UIs: fix "deprecated native modifier on v-on directive" (Vue3 MUST FIX)[/+] on Aug 2, 2023
  8. added
    Entities Team
    on Feb 23, 2024
  9. removed
    Entities Team
    on Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions