diff --git a/src/Gang/ui/TaskSelector.tsx b/src/Gang/ui/TaskSelector.tsx index ff19ff550..4c779dc31 100644 --- a/src/Gang/ui/TaskSelector.tsx +++ b/src/Gang/ui/TaskSelector.tsx @@ -21,6 +21,13 @@ export function TaskSelector(props: IProps): React.ReactElement { const gang = useGang(); const [currentTask, setCurrentTask] = useState(props.member.task); + const contextMember = gang.members.find(member => member.name == props.member.name) + if (contextMember && + contextMember.task != currentTask + ) { + setCurrentTask(contextMember.task) + } + function onChange(event: SelectChangeEvent): void { const task = event.target.value; props.member.assignToTask(task);