Skip to content

Commit

Permalink
Only allow moving selected columns to the left of the experiments table
Browse files Browse the repository at this point in the history
  • Loading branch information
mattseddon committed Jul 18, 2023
1 parent 196ce87 commit 0ab6446
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion extension/src/experiments/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,16 @@ export class Experiments extends BaseRepository<TableData> {
public async selectFirstColumns() {
const columns = this.columns.getTerminalNodes()

const selectedColumns = []
for (const column of columns) {
if (!column.selected) {
continue
}
selectedColumns.push({ ...column, selected: false })
}

const selected = await pickPaths(
columns.map(column => ({ ...column, selected: false })),
selectedColumns,
Title.SELECT_FIRST_COLUMNS
)
if (!definedAndNonEmpty(selected)) {
Expand Down

0 comments on commit 0ab6446

Please sign in to comment.