add row on click if user can edit (#15998)
This commit is contained in:
@@ -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={[
|
||||
|
||||
Reference in New Issue
Block a user