-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
New Item has changes even without any modifications #11088
Comments
I noticed you have a |
I just created a collection without any fields, only ID (automatically created), and have the same issue 😕 |
Hi friends,
change to: changes "defaults.value" to "edits.value" |
Maybe we need to differentiate default values created by users and other default values, and only do the check for default values created by user: |
There's no way to differentiate between the two. They're stored and returned in the same location by the database 👍🏻 |
Maybe we could ignore defaults which doesn't match the type value, for example, in this case |
Yeah! There's also an active discussion on the knex-schema-inspector around a way to split up generated default values (like nextval()) and "regular" static ones (knex/knex-schema-inspector#73) cc @Oreilles |
We should only show a warning if the user actually made changes to the item. Fixes #11088
We should only show a warning if the user actually made changes to the item. Fixes #11088
Preflight Checklist
Describe the Bug
When I am trying to leave the New Item view without any changes the confirmation modal appears.
Also, when I click
Discard Changes
it shows the confirmation modal again and this process repeats and I am not able to quit this view.To Reproduce
I am not sure why this started happened now, but this is easy reproducible:
Errors Shown
See this screenshot
![Screenshot 2022-01-17 at 06 46 25](https://user-images.githubusercontent.com/14039341/149721351-a5e6e429-ff0d-4897-b039-d1b4e33b8642.png)
Those are the edits, but I didn't make any change 🤔
The
nextval
thing comes from the default value from PostgreSQLWhat version of Directus are you using?
9.4.3 (e258f3d - main)
What version of Node.js are you using?
v16.13.0
What database are you using?
postgis/postgis:13-3.1-alpine
What browser are you using?
Chrome
What operating system are you using?
macOS
How are you deploying Directus?
running locally
The text was updated successfully, but these errors were encountered: