mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) Fix for layout editor when fields are removed
Summary: Fix for layout editor when fields are removed using the creator panel. Layout editor wasn't updated properly when "layoutSpecs" were changed. Test Plan: Updated Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D3700
This commit is contained in:
parent
2248053b09
commit
46148aa125
@ -326,7 +326,7 @@ RecordLayout.prototype.buildLayoutDom = function(row, optCreateEditor) {
|
||||
)
|
||||
);
|
||||
|
||||
const sub = this.layoutSpec.subscribe((spec) => { layout.buildLayout(spec); });
|
||||
const sub = this.layoutSpec.subscribe((spec) => { layout.buildLayout(spec, createEditor); });
|
||||
|
||||
if (createEditor) {
|
||||
this.layoutEditor(RecordLayoutEditor.create(this, layout));
|
||||
|
@ -1041,9 +1041,13 @@ export async function openAddWidgetToPage() {
|
||||
// must be already opened when calling this function.
|
||||
export async function selectWidget(
|
||||
typeRe: RegExp|string,
|
||||
tableRe: RegExp|string,
|
||||
tableRe: RegExp|string = '',
|
||||
options: PageWidgetPickerOptions = {}) {
|
||||
|
||||
// select right type
|
||||
await driver.findContent('.test-wselect-type', typeRe).doClick();
|
||||
|
||||
if (tableRe) {
|
||||
const tableEl = driver.findContent('.test-wselect-table', tableRe);
|
||||
|
||||
// unselect all selected columns
|
||||
@ -1074,9 +1078,8 @@ export async function selectWidget(
|
||||
await driver.find('.test-wselect-selectby').doClick();
|
||||
await driver.findContent('.test-wselect-selectby option', options.selectBy).doClick();
|
||||
}
|
||||
}
|
||||
|
||||
// select right type
|
||||
await driver.findContent('.test-wselect-type', typeRe).doClick();
|
||||
|
||||
if (options.dontAdd) {
|
||||
return;
|
||||
@ -1985,7 +1988,8 @@ export class Session {
|
||||
return doc;
|
||||
}
|
||||
|
||||
public async tempNewDoc(cleanup: Cleanup, docName: string, {load} = {load: true}) {
|
||||
public async tempNewDoc(cleanup: Cleanup, docName: string = '', {load} = {load: true}) {
|
||||
docName ||= `Test${Date.now()}`;
|
||||
const docId = await createNewDoc(this.settings.name, this.settings.orgDomain, this.settings.workspace,
|
||||
docName, {email: this.settings.email});
|
||||
if (load) {
|
||||
|
Loading…
Reference in New Issue
Block a user