upd: member
Deskripsi: - detail member - aktivasi member - edit member No Issues
This commit is contained in:
@@ -17,14 +17,15 @@ type Props = {
|
||||
category: 'group' | 'status-task' | 'position' | 'role' | 'gender'
|
||||
idParent?: string
|
||||
onSelect: (value: { val: string, label: string }) => void
|
||||
valChoose?: string
|
||||
}
|
||||
|
||||
export default function ModalSelect({ open, close, title, category, idParent, onSelect }: Props) {
|
||||
export default function ModalSelect({ open, close, title, category, idParent, onSelect, valChoose }: Props) {
|
||||
const { token, decryptToken } = useAuthSession()
|
||||
const entityUser = useSelector((state: any) => state.user)
|
||||
const dispatch = useDispatch()
|
||||
const entitiesGroup = useSelector((state: any) => state.filterGroup)
|
||||
const [chooseValue, setChooseValue] = useState({ val: '', label: '' })
|
||||
const [chooseValue, setChooseValue] = useState({ val: valChoose, label: '' })
|
||||
const [data, setData] = useState<any>([])
|
||||
|
||||
async function handleLoadGroup() {
|
||||
@@ -65,6 +66,7 @@ export default function ModalSelect({ open, close, title, category, idParent, on
|
||||
} else if (category == "gender") {
|
||||
handleLoadGender()
|
||||
}
|
||||
setChooseValue({ ...chooseValue, val: valChoose })
|
||||
}, [dispatch, open]);
|
||||
|
||||
function onChoose(val: string, label: string) {
|
||||
|
||||
Reference in New Issue
Block a user