fix(containers/datatable): disable autoreset expanded and selected rows [EE-2347] (#6563)

pull/6638/head^2
Marcelo Rydel 2022-03-17 14:55:11 -03:00 committed by GitHub
parent 9aeedf1bfa
commit d962c300f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -100,6 +100,10 @@ export function ContainersDatatable({
isRowSelectable(row: Row<DockerContainer>) { isRowSelectable(row: Row<DockerContainer>) {
return !row.original.IsPortainer; return !row.original.IsPortainer;
}, },
autoResetSelectedRows: false,
getRowId(originalRow: DockerContainer) {
return originalRow.Id;
},
selectCheckboxComponent: Checkbox, selectCheckboxComponent: Checkbox,
}, },
useFilters, useFilters,

View File

@ -107,6 +107,9 @@ export function EdgeDevicesDatatable({
}, },
autoResetExpanded: false, autoResetExpanded: false,
autoResetSelectedRows: false, autoResetSelectedRows: false,
getRowId(originalRow: Environment) {
return originalRow.Id.toString();
},
selectColumnWidth: 5, selectColumnWidth: 5,
}, },
useFilters, useFilters,