mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Polish and enable Reference List widget
Summary: Adds Reference List as a widget type. Reference List is similar to Choice List: multiple references can be added to each cell through a similar editor, and the individual references will always reflect their current value from the referenced table. Test Plan: Browser tests. Reviewers: dsagal Reviewed By: dsagal Subscribers: paulfitz, jarek, alexmojaki, dsagal Differential Revision: https://phab.getgrist.com/D2959
This commit is contained in:
@@ -28,7 +28,7 @@ import * as gristTypes from 'app/common/gristTypes';
|
||||
import { getReferencedTableId, isFullReferencingType } from 'app/common/gristTypes';
|
||||
import { CellValue } from 'app/plugin/GristData';
|
||||
import { Computed, Disposable, fromKo, dom as grainjsDom,
|
||||
Holder, IDisposable, makeTestId, toKo } from 'grainjs';
|
||||
Holder, IDisposable, makeTestId, styled, toKo } from 'grainjs';
|
||||
import * as ko from 'knockout';
|
||||
import * as _ from 'underscore';
|
||||
|
||||
@@ -222,7 +222,8 @@ export class FieldBuilder extends Disposable {
|
||||
grainjsDom.autoDispose(selectType),
|
||||
select(selectType, this._availableTypes, {
|
||||
disabled: (use) => use(this._isTransformingFormula) || use(this.origColumn.disableModifyBase) ||
|
||||
use(this.isCallPending)
|
||||
use(this.isCallPending),
|
||||
menuCssClass: cssTypeSelectMenu.className,
|
||||
}),
|
||||
testId('type-select'),
|
||||
grainjsDom.cls('tour-type-selector'),
|
||||
@@ -526,3 +527,7 @@ export class FieldBuilder extends Disposable {
|
||||
this.gristDoc.fieldEditorHolder.autoDispose(editorHolder);
|
||||
}
|
||||
}
|
||||
|
||||
const cssTypeSelectMenu = styled('div', `
|
||||
max-height: 500px;
|
||||
`);
|
||||
|
||||
Reference in New Issue
Block a user