mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 11:47:23 +03:00
Update powerlevel/role when the user changes in the user info panel (#7099)
This commit is contained in:
parent
06e1f8ce85
commit
6cae176857
1 changed files with 4 additions and 0 deletions
|
@ -1122,6 +1122,10 @@ const PowerLevelEditor: React.FC<{
|
|||
const cli = useContext(MatrixClientContext);
|
||||
|
||||
const [selectedPowerLevel, setSelectedPowerLevel] = useState(user.powerLevel);
|
||||
useEffect(() => {
|
||||
setSelectedPowerLevel(user.powerLevel);
|
||||
}, [user]);
|
||||
|
||||
const onPowerChange = useCallback(async (powerLevel: number) => {
|
||||
setSelectedPowerLevel(powerLevel);
|
||||
|
||||
|
|
Loading…
Reference in a new issue