Skip to content

Commit

Permalink
Fix display of multiple roles in table views (#81603)
Browse files Browse the repository at this point in the history
  • Loading branch information
legrego authored Oct 26, 2020
1 parent 7f0e1c8 commit ca8341b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -330,14 +330,16 @@ export class RoleMappingsGridPage extends Component<Props, State> {
this.state.roles?.find((r) => r.name === rolename) ?? rolename;

return (
<RoleTableDisplay
role={role}
key={rolename}
navigateToApp={this.props.navigateToApp}
/>
<EuiFlexItem grow={false} key={rolename}>
<RoleTableDisplay role={role} navigateToApp={this.props.navigateToApp} />
</EuiFlexItem>
);
});
return <div data-test-subj="roleMappingRoles">{roleLinks}</div>;
return (
<EuiFlexGroup gutterSize="s" data-test-subj="roleMappingRoles" wrap>
{roleLinks}
</EuiFlexGroup>
);
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,16 @@ export class UsersGridPage extends Component<Props, State> {
const roleLinks = rolenames.map((rolename, index) => {
const roleDefinition = roles?.find((role) => role.name === rolename) ?? rolename;
return (
<RoleTableDisplay
role={roleDefinition}
key={rolename}
navigateToApp={this.props.navigateToApp}
/>
<EuiFlexItem grow={false} key={rolename}>
<RoleTableDisplay role={roleDefinition} navigateToApp={this.props.navigateToApp} />
</EuiFlexItem>
);
});
return <div data-test-subj="userRowRoles">{roleLinks}</div>;
return (
<EuiFlexGroup data-test-subj="userRowRoles" gutterSize="s" wrap>
{roleLinks}
</EuiFlexGroup>
);
},
},
{
Expand Down

0 comments on commit ca8341b

Please sign in to comment.