add row on click if user can edit (#15998)

This commit is contained in:
sean-brydon
2024-07-31 11:12:48 +00:00
committed by GitHub
parent b48e3c7bb4
commit 9f43c5f1e7
@@ -323,6 +323,19 @@ export function UserListTable() {
return (
<>
<DataTable
onRowMouseclick={(row) => {
const user = row.original;
const canEdit = adminOrOwner;
if (canEdit) {
dispatch({
type: "EDIT_USER_SHEET",
payload: {
showModal: true,
user,
},
});
}
}}
data-testId="user-list-data-table"
onSearch={(value) => setDebouncedSearchTerm(value)}
selectionOptions={[