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

Allow the front end to add rows to a table with a PK column that has no dynamic default #2124

Closed
seancolsen opened this issue Dec 19, 2022 · 1 comment
Labels
ready Ready for implementation type: enhancement New feature or request work: frontend Related to frontend code in the mathesar_ui directory
Milestone

Comments

@seancolsen
Copy link
Contributor

Current behavior

  • If the PK column in a table has a dynamic default, then the user is able to add new rows just fine.

  • If the PK column in a table has null as its default, then the user gets stuck in this state when attempting to add a new row

    image

    Here, the front end is performing client-side validation before sending an API request to create the record, and seeing that the id column defaults to null but has a not-NULL constraint (by virtue of having a primary key). The front end also prohibits editing PK cells. So the user is stuck without the ability to enter a new value into the id cell.

Desired behavior

  • The user can enter a new value into the PK cell when creating the record.
  • After the record is created, the user can no longer edit the PK cell value.
@seancolsen seancolsen added ready Ready for implementation type: enhancement New feature or request work: frontend Related to frontend code in the mathesar_ui directory labels Dec 19, 2022
@seancolsen seancolsen added this to the 2023 or later milestone Dec 19, 2022
@pavish
Copy link
Member

pavish commented Dec 20, 2022

This seems to be a duplicate of #1356. I'm closing this in favour of that one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Ready for implementation type: enhancement New feature or request work: frontend Related to frontend code in the mathesar_ui directory
Projects
No open projects
Development

No branches or pull requests

2 participants