mathesar
mathesar copied to clipboard
Send `null` for string-like columns that don't allow empty strings when cell is cleared
Description
- Open or create a table with a column that allows string input that performs some validation.
- Date & Time
- Date
- URI etc.,
- Let's say we have a URI column.
- Edit a cell and enter some string., eg.,
"test"
. - This will result in an error. That's expected.
- Now edit the cell again and remove everything clearing the cell.
- This will result in an error again, when it shouldn't.
- That's because the frontend sends the patch request with an empty string
""
. - (The user can still right click and set to null, but that's not always obvious in this situation).
- For such columns that have custom validation and do not allow empty strings, the frontend should send
null
instead of empty string""
.