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

Need a way to ignore some fields for "Leave page" warning #122

Open
nirgal opened this issue Feb 15, 2019 · 0 comments
Open

Need a way to ignore some fields for "Leave page" warning #122

nirgal opened this issue Feb 15, 2019 · 0 comments

Comments

@nirgal
Copy link
Contributor

nirgal commented Feb 15, 2019

Here's a feature request :

I'm having a few minor issues with confirmFormDiscard : While this is a nice feature, I occasionally would like to ignore some fields.
In my case, this is a "quick search" widget in the header for example.
But people have been reporting similar wishes like in filters (see #86).

I guess it wouldn't be too difficult to add a class/attribute/whatever to a form/field that would make the check ignore some forms/fields.

The idea would be modify formChange function, and check that an ignore-dirty / ignore-change / whatever is not present before setting the data-dirty attribute. Preferably in the whole DOM tree above the input element.

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

No branches or pull requests

1 participant