Skip to content

Commit

Permalink
fix: change active selection based on user input
Browse files Browse the repository at this point in the history
  • Loading branch information
kaustavb12 committed Aug 12, 2024
1 parent 2d9807e commit 57c5ce4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,14 @@ class MasqueradeWidget extends Component {
this.props.onError('');
}

toggle(show) {
toggle(show, groupId, role, userName, userPartitionId) {
this.setState(prevState => ({
autoFocus: true,
masquerade: 'Specific Student...',
shouldShowUserNameInput: show === undefined ? !prevState.shouldShowUserNameInput : show,
active: {
...prevState.active, groupId, role, userName, userPartitionId,
},
}));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class MasqueradeWidgetOption extends Component {
} = this.props;
const payload = {};
if (userName || userName === '') {
userNameInputToggle(true);
userNameInputToggle(true, groupId, role, userName, userPartitionId);
return false;
}
if (role) {
Expand Down

0 comments on commit 57c5ce4

Please sign in to comment.