mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Summary:
Cleaning code that was wrongly merged during D4083 Test Plan: Manual smoke tests - create columns and references are working Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D4085
This commit is contained in:
@@ -344,48 +344,6 @@ function buildLookupSection(gridView: GridView, index?: number){
|
||||
};
|
||||
}
|
||||
|
||||
return [
|
||||
menuDivider(),
|
||||
menuSubHeader(
|
||||
t('Lookups'),
|
||||
testId('new-columns-menu-lookups'),
|
||||
),
|
||||
references.length === 0
|
||||
? [
|
||||
menuText(
|
||||
t('No reference columns.'),
|
||||
testId('new-columns-menu-lookups-none'),
|
||||
),
|
||||
]
|
||||
: references.map((ref) => menuItemSubmenu(
|
||||
() => {
|
||||
return searchableMenu(
|
||||
ref.refTable()?.visibleColumns().map((col) => ({
|
||||
cleanText: col.label().trim().toLowerCase(),
|
||||
label: col.label(),
|
||||
action: async () => {
|
||||
await gridView.insertColumn(t(`${ref.label()}_${col.label()}`), {
|
||||
colInfo: {
|
||||
label: `${ref.label()}_${col.label()}`,
|
||||
isFormula: true,
|
||||
formula: `$${ref.colId()}.${col.colId()}`,
|
||||
recalcWhen: RecalcWhen.DEFAULT,
|
||||
recalcDeps: null,
|
||||
},
|
||||
index,
|
||||
skipPopup: true,
|
||||
});
|
||||
},
|
||||
})) ?? [],
|
||||
{searchInputPlaceholder: t('Search columns')}
|
||||
);
|
||||
},
|
||||
{allowNothingSelected: true},
|
||||
ref.label(),
|
||||
testId(`new-columns-menu-lookups-${ref.label()}`),
|
||||
)),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
function buildLookupsMenuItems() {
|
||||
|
||||
Reference in New Issue
Block a user