mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
Allowing new row on recrod card
This commit is contained in:
parent
9806e1a4c0
commit
4cde2202b5
@ -701,7 +701,7 @@ export class GristDoc extends DisposableWithEvents {
|
|||||||
|
|
||||||
const {recordCard, rowId} = popupOptions.hash;
|
const {recordCard, rowId} = popupOptions.hash;
|
||||||
if (recordCard) {
|
if (recordCard) {
|
||||||
if (!rowId || rowId === 'new') {
|
if (!rowId) {
|
||||||
// Should be unreachable, but just to be sure (and to satisfy type checking)...
|
// Should be unreachable, but just to be sure (and to satisfy type checking)...
|
||||||
throw new Error('Unable to open Record Card: undefined row id');
|
throw new Error('Unable to open Record Card: undefined row id');
|
||||||
}
|
}
|
||||||
|
@ -7,13 +7,14 @@ import {ViewSectionRec} from 'app/client/models/DocModel';
|
|||||||
import {ChangeType, RowList} from 'app/client/models/rowset';
|
import {ChangeType, RowList} from 'app/client/models/rowset';
|
||||||
import {theme} from 'app/client/ui2018/cssVars';
|
import {theme} from 'app/client/ui2018/cssVars';
|
||||||
import {DisposableWithEvents} from 'app/common/DisposableWithEvents';
|
import {DisposableWithEvents} from 'app/common/DisposableWithEvents';
|
||||||
|
import {UIRowId} from 'app/plugin/GristAPI';
|
||||||
import {dom, makeTestId, styled} from 'grainjs';
|
import {dom, makeTestId, styled} from 'grainjs';
|
||||||
|
|
||||||
const testId = makeTestId('test-record-card-popup-');
|
const testId = makeTestId('test-record-card-popup-');
|
||||||
|
|
||||||
interface RecordCardPopupOptions {
|
interface RecordCardPopupOptions {
|
||||||
gristDoc: GristDoc;
|
gristDoc: GristDoc;
|
||||||
rowId: number;
|
rowId: UIRowId;
|
||||||
viewSection: ViewSectionRec;
|
viewSection: ViewSectionRec;
|
||||||
onClose(): void;
|
onClose(): void;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user