SegmentedControl bug fixed

Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
Ajay Bura 2021-10-23 15:41:16 +05:30
parent f11e4f6626
commit ed62d06b5e
2 changed files with 5 additions and 2 deletions

View file

@ -1,4 +1,4 @@
import React, { useState } from 'react';
import React, { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import './SegmentedControls.scss';
@ -17,6 +17,10 @@ function SegmentedControls({
onSelect(segmentIndex);
}
useEffect(() => {
setSelect(selected);
}, [selected]);
return (
<div className="segmented-controls">
{

View file

@ -65,7 +65,6 @@ function PeopleDrawer({ roomId }) {
const [itemCount, setItemCount] = useState(PER_PAGE_MEMBER);
const [membership, setMembership] = useState('join');
window.setMemberShip = setMembership;
const [memberList, setMemberList] = useState([]);
const [searchedMembers, setSearchedMembers] = useState(null);
const searchRef = useRef(null);