SegmentedControl bug fixed
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
f11e4f6626
commit
ed62d06b5e
2 changed files with 5 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import './SegmentedControls.scss';
|
import './SegmentedControls.scss';
|
||||||
|
|
||||||
|
@ -17,6 +17,10 @@ function SegmentedControls({
|
||||||
onSelect(segmentIndex);
|
onSelect(segmentIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setSelect(selected);
|
||||||
|
}, [selected]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="segmented-controls">
|
<div className="segmented-controls">
|
||||||
{
|
{
|
||||||
|
|
|
@ -65,7 +65,6 @@ function PeopleDrawer({ roomId }) {
|
||||||
|
|
||||||
const [itemCount, setItemCount] = useState(PER_PAGE_MEMBER);
|
const [itemCount, setItemCount] = useState(PER_PAGE_MEMBER);
|
||||||
const [membership, setMembership] = useState('join');
|
const [membership, setMembership] = useState('join');
|
||||||
window.setMemberShip = setMembership;
|
|
||||||
const [memberList, setMemberList] = useState([]);
|
const [memberList, setMemberList] = useState([]);
|
||||||
const [searchedMembers, setSearchedMembers] = useState(null);
|
const [searchedMembers, setSearchedMembers] = useState(null);
|
||||||
const searchRef = useRef(null);
|
const searchRef = useRef(null);
|
||||||
|
|
Loading…
Reference in a new issue