mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Polish Record Cards
Summary: Improvements - Widget and column descriptions are now copied when duplicating a table. - A Grist Plugin API command to open a Record Card is now available. - New Card widgets set initial settings based on those used by their table's Record Card. Fixes - Opening a reference in a Record Card from a Raw Data popup now opens the correct reference. Test Plan: Browser and python tests. Reviewers: jarek Reviewed By: jarek Differential Revision: https://phab.getgrist.com/D4164
This commit is contained in:
@@ -99,10 +99,7 @@ export interface ViewSectionRec extends IRowModel<"_grist_Views_section">, RuleO
|
||||
/** True if this section is disabled. Currently only used by Record Card sections. */
|
||||
disabled: modelUtil.KoSaveableObservable<boolean>;
|
||||
|
||||
/**
|
||||
* True if the Record Card section of this section's table is disabled. Shortcut for
|
||||
* `this.tableRecordCard().disabled()`.
|
||||
*/
|
||||
/** True if the Record Card section of this section's table is disabled. */
|
||||
isTableRecordCardDisabled: ko.Computed<boolean>;
|
||||
|
||||
isVirtual: ko.Computed<boolean>;
|
||||
@@ -485,7 +482,8 @@ export function createViewSectionRec(this: ViewSectionRec, docModel: DocModel):
|
||||
this.isRecordCard = this.autoDispose(ko.pureComputed(() =>
|
||||
this.table().recordCardViewSectionRef() === this.id()));
|
||||
this.disabled = modelUtil.fieldWithDefault(this.optionsObj.prop('disabled'), false);
|
||||
this.isTableRecordCardDisabled = ko.pureComputed(() => this.tableRecordCard().disabled());
|
||||
this.isTableRecordCardDisabled = this.autoDispose(ko.pureComputed(() => this.tableRecordCard().disabled() ||
|
||||
this.table().summarySourceTable() !== 0));
|
||||
|
||||
this.isVirtual = this.autoDispose(ko.pureComputed(() => typeof this.id() === 'string'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user