수정
This commit is contained in:
@@ -11,10 +11,13 @@ import { useStore } from '@/shared/model/store';
|
||||
export const UserManageWrap = () => {
|
||||
const { t } = useTranslation();
|
||||
const { navigate } = useNavigate();
|
||||
const midOptions = useStore.getState().UserStore.selectOptionsMids;
|
||||
const midOptionsWithoutGids = useStore.getState().UserStore.selectOptionsMidsWithoutGids;
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
let midItem = midOptionsWithoutGids.filter((value, index) => {
|
||||
return value.value === userMid;
|
||||
});
|
||||
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
const [mid, setMid] = useState<string>((midItem.length > 0)? userMid: '');
|
||||
const [userItems, setUserItems] = useState<Array<UserListItem>>([]);
|
||||
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
||||
|
||||
@@ -38,7 +41,9 @@ export const UserManageWrap = () => {
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
callList();
|
||||
if(!!mid){
|
||||
callList();
|
||||
}
|
||||
}, [mid]);
|
||||
|
||||
return (
|
||||
@@ -52,7 +57,7 @@ export const UserManageWrap = () => {
|
||||
onChange={ (e: ChangeEvent<HTMLSelectElement>) => setMid(e.target.value)}
|
||||
>
|
||||
{
|
||||
midOptions.map((value, index) => (
|
||||
midOptionsWithoutGids.map((value, index) => (
|
||||
<option
|
||||
key={ value.value }
|
||||
value={ value.value }
|
||||
|
||||
Reference in New Issue
Block a user