Skip to content

Commit

Permalink
fix display of context menus scoped to selected rows (finos#908)
Browse files Browse the repository at this point in the history
  • Loading branch information
heswell authored Oct 16, 2023
1 parent bd48952 commit 110a91b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion vuu-ui/packages/vuu-datagrid/src/Viewport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export interface ViewportScrollApi {

// Temp, until we manage selection properly
const getSelectedRows = (data: DataSourceRow[]) => {
return data.filter((d) => d[metadataKeys.SELECTED] === 1);
return data.filter((d) => d[metadataKeys.SELECTED] !== 0);
};

export const Viewport = forwardRef(function Viewport(
Expand Down
2 changes: 1 addition & 1 deletion vuu-ui/packages/vuu-table/src/table-next/moving-window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ export class MovingWindow {
}

getSelectedRows() {
return this.data.filter((row) => row[SELECTED] === 1);
return this.data.filter((row) => row[SELECTED] !== 0);
}
}
2 changes: 1 addition & 1 deletion vuu-ui/packages/vuu-table/src/table/useDataSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,6 @@ export class MovingWindow {
}

getSelectedRows() {
return this.data.filter((row) => row[SELECTED] === 1);
return this.data.filter((row) => row[SELECTED] !== 0);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ export class MovingWindow {
}

getSelectedRows() {
return this.data.filter((row) => row[SELECTED] === 1);
return this.data.filter((row) => row[SELECTED] !== 0);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ export class MovingWindow {
}

getSelectedRows() {
return this.data.filter((row) => row[SELECTED] === 1);
return this.data.filter((row) => row[SELECTED] !== 0);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ export class MovingWindow {
}

getSelectedRows() {
return this.data.filter((row) => row[SELECTED] === 1);
return this.data.filter((row) => row[SELECTED] !== 0);
}
}

0 comments on commit 110a91b

Please sign in to comment.