(core) Showing close button when column is added

Summary:
When a column is added the rename popup had a disabled save button.
Now we always show either:
Just "Close" if there are no changes.
"Save" and "Cancel" if there are changes.

Also, the description is trimmed when saved through the creator panel.

Test Plan: Added

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3872
This commit is contained in:
Jarosław Sadziński
2023-04-26 23:12:12 +02:00
parent 959f8a45c6
commit 5f9f4868ae
3 changed files with 173 additions and 13 deletions

View File

@@ -34,7 +34,7 @@ export function buildDescriptionConfig(
{ onInput: false },
{ rows: '3' },
dom.on('blur', async (e, elem) => {
await origColumn.description.saveOnly(elem.value);
await origColumn.description.setAndSave(elem.value.trim());
}),
testId('column-description'),
autoGrow(fromKo(origColumn.description))