fix: linter correction

This commit is contained in:
Camille 2023-01-19 12:51:02 +01:00
parent 009ebefd96
commit 969280629b

View File

@ -95,10 +95,6 @@ export function buildDescriptionConfig(
cursor: ko.Computed<CursorPos>, cursor: ko.Computed<CursorPos>,
) { ) {
const editedDescription = Observable.create(owner, ''); const editedDescription = Observable.create(owner, '');
const saveDescription = async (val: string) => {
await origColumn.description.saveOnly(val);
editedDescription.set('');
}
// We will listen to cursor position and force a blur event on // We will listen to cursor position and force a blur event on
// the text input, which will trigger save before the column observable // the text input, which will trigger save before the column observable
@ -118,9 +114,10 @@ export function buildDescriptionConfig(
editor = cssTextArea(fromKo(origColumn.description), editor = cssTextArea(fromKo(origColumn.description),
{ onInput: false }, { onInput: false },
{ placeholder: t("If necesary, describe the column") }, { placeholder: t("If necesary, describe the column") },
dom.on('input', (e, elem) => { dom.on('input', async (e, elem) => {
editedDescription.set(elem.value); editedDescription.set(elem.value);
saveDescription(elem.value) await origColumn.description.saveOnly(elem.value);
editedDescription.set('');
}), }),
) )
), ),