vuetifyjs / vuetifyjs/vuetify

[Feature Request] Expose the "isDirty" flag on a form and inputs

Open
#21,206 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

T: feature
Dominant language
TypeScript
Stars
41k
Forks
7.1k
Avg merge
1d 21h
Merged PRs (30d)
11

Description

Problem to solve

There is isValid value exposed on a form but no isDirty value.
Moreover, it's impossible to get an input's isDirty value through formRef.items or inputRef. The values are only available to slots (at least that is what documentation says).
So, it looks like there is no way to know if a form (or even an input) is dirty to prevent a user from leaving without saving the form data.

Proposed solution

It would be greate to be able to get isDirty values through the form or\and input refs.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the form and input ref APIs mentioned in the issue, especially formRef.items and inputRef, and compare them with the slot-provided values described in the documentation. Determine where isValid is exposed and what corresponding isDirty behavior should cover for forms and inputs; done means the values are accessible through the requested refs and documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.