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

[Feature Request] VConfirmEdit - expose dirty/pristine status #19747

Assignees
Labels
C: VConfirmEdit T: enhancement Functionality that enhances existing features
Milestone

Comments

@daniser
Copy link

daniser commented May 3, 2024

Problem to solve

Ability to check if underlying model have changed or not.
For example, to hide action buttons:

<template>
  <v-confirm-edit v-model="model">
    <template #default="{ model: proxyModel, actions, isPristine }">
      <v-card>
        <v-card-text>
          <v-text-field v-model="proxyModel.value" />
        </v-card-text>
        <v-card-actions>
          <component v-if="!isPristine" :is="actions" />
        </v-card-actions>
      </v-card>
    </template>
  </v-confirm-edit>
</template>

Proposed solution

Expose isPristine variable from component.

@KaelWD KaelWD added T: enhancement Functionality that enhances existing features C: VConfirmEdit labels May 16, 2024
@KaelWD KaelWD self-assigned this May 16, 2024
@KaelWD KaelWD added this to the v3.6.x milestone May 16, 2024
@KaelWD KaelWD closed this as completed in 8ed8731 May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment