You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gristlabs_grist-core/app/client/widgets/ReferenceListEditor.ts

17 lines
469 B

import {NTextEditor} from 'app/client/widgets/NTextEditor';
import {CellValue} from "app/common/DocActions";
/**
* A ReferenceListEditor offers an autocomplete of choices from the referenced table.
*/
export class ReferenceListEditor extends NTextEditor {
public getCellValue(): CellValue {
try {
return ['L', ...JSON.parse(this.textInput.value)];
} catch {
return null; // This is the default value for a reference list column.
}
}
}