mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Fixing selectby error on the creator panel.
Summary: [Select By] in the creator panel was bugged. It wasn't refreshed in some cases as the observable array that needed to be created seemed too complicated. This Diff recomputes this array when the user wants to change the selection. Test Plan: added tests Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D3541
This commit is contained in:
@@ -189,7 +189,7 @@ export function fromTableDataAction(tableData: TableDataAction): TableColValues
|
||||
* Convert a list of rows into an object with columns of values, used for
|
||||
* BulkAddRecord/BulkUpdateRecord actions.
|
||||
*/
|
||||
export function getColValues(records: RowRecord[]): BulkColValues {
|
||||
export function getColValues(records: Partial<RowRecord>[]): BulkColValues {
|
||||
const colIdSet = new Set<string>();
|
||||
for (const r of records) {
|
||||
for (const c of Object.keys(r)) {
|
||||
@@ -200,7 +200,7 @@ export function getColValues(records: RowRecord[]): BulkColValues {
|
||||
}
|
||||
const result: BulkColValues = {};
|
||||
for (const colId of colIdSet) {
|
||||
result[colId] = records.map(r => r[colId]);
|
||||
result[colId] = records.map(r => r[colId]!);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user