From 57c5ce4b9b8d53c6bdca89381615db7b0ee42cb2 Mon Sep 17 00:00:00 2001 From: Kaustav Banerjee Date: Mon, 12 Aug 2024 18:23:35 +0530 Subject: [PATCH] fix: change active selection based on user input --- .../masquerade-widget/MasqueradeWidget.jsx | 5 ++++- .../masquerade-widget/MasqueradeWidgetOption.jsx | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/instructor-toolbar/masquerade-widget/MasqueradeWidget.jsx b/src/instructor-toolbar/masquerade-widget/MasqueradeWidget.jsx index 1b834cdfca..9998e4e839 100644 --- a/src/instructor-toolbar/masquerade-widget/MasqueradeWidget.jsx +++ b/src/instructor-toolbar/masquerade-widget/MasqueradeWidget.jsx @@ -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, + }, })); } diff --git a/src/instructor-toolbar/masquerade-widget/MasqueradeWidgetOption.jsx b/src/instructor-toolbar/masquerade-widget/MasqueradeWidgetOption.jsx index 83a55801f7..efd04a78d6 100644 --- a/src/instructor-toolbar/masquerade-widget/MasqueradeWidgetOption.jsx +++ b/src/instructor-toolbar/masquerade-widget/MasqueradeWidgetOption.jsx @@ -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) {