Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CB-5566 Administration - check-boxes are removed in the list of items after applying a filter #3026

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const ConnectionList = observer<Props>(function ConnectionList({ connecti
}, []);

const connections = getFilteredConnections(connectionList, connectionsOrigins, filterState.filterValue);
const keys = connections.map(connection => connection.id);
const keys = connectionList.map(connection => connection.id);

return (
<Group className={s(style, { group: true })} box border medium overflow vertical>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const GrantedConnectionList = observer<Props>(function GrantedConnectionL
const [filterState] = useState<IFilterState>(() => observable({ filterValue: '' }));

const connections = getFilteredConnections(grantedConnections, connectionsOrigins, filterState.filterValue);
const keys = connections.map(connection => connection.id);
const keys = grantedConnections.map(connection => connection.id);

const selected = getComputed(() => Array.from(selectedSubjects.values()).some(v => v));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const GrantedUserList = observer<Props>(function GrantedUserList({ grante
const selected = getComputed(() => Array.from(selectedSubjects.values()).some(v => v));

const users = getFilteredUsers(grantedUsers, filterState.filterValue) as IGrantedUser[];
const keys = users.map(user => user.userId);
const keys = grantedUsers.map(user => user.userId);

const revoke = useCallback(() => {
props.onRevoke(getSelectedItems(selectedSubjects));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const UserList = observer<Props>(function UserList({ userList, grantedUse
const selected = getComputed(() => Array.from(selectedSubjects.values()).some(v => v));

const users = getFilteredUsers(userList, filterState.filterValue);
const keys = users.map(user => user.userId);
const keys = userList.map(user => user.userId);

const grant = useCallback(() => {
props.onGrant(getSelectedItems(selectedSubjects));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const ConnectionAccessGrantedList = observer<Props>(function ConnectionAc

const teams = getFilteredTeams(grantedTeams, filterState.filterValue);
const users = getFilteredUsers(grantedUsers, filterState.filterValue);
const keys = teams.map(team => team.teamId).concat(users.map(user => user.userId));
const keys = grantedTeams.map(team => team.teamId).concat(grantedUsers.map(user => user.userId));

let tableInfoText: TLocalizationToken = 'connections_connection_access_admin_info';
if (!keys.length) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const ConnectionAccessList = observer<Props>(function ConnectionAccessLis

const teams = getFilteredTeams(teamList, filterState.filterValue);
const users = getFilteredUsers(userList, filterState.filterValue);
const keys = teams.map(team => team.teamId).concat(users.map(user => user.userId));
const keys = teamList.map(team => team.teamId).concat(userList.map(user => user.userId));

const selected = getComputed(() => Array.from(selectedSubjects.values()).some(v => v));

Expand Down
Loading