Merge pull request 'turbo add fix' (#236) from turbo-add-instant-add into main
Reviewed-on: Pozomind/pozo-retail-app#236
This commit is contained in:
commit
0236fee8af
|
|
@ -14,7 +14,7 @@ const DefaultSettingPopover = memo(({ field, options, onSubmit, currentDefault,
|
||||||
const [applyToAll, setApplyToAll] = useState(false);
|
const [applyToAll, setApplyToAll] = useState(false);
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
const [fetchSubCategoriesData, setFetchSubCategoriesData] = useState(false);
|
const [fetchSubCategoriesData, setFetchSubCategoriesData] = useState(false);
|
||||||
console.log(Component, "showField")
|
console.log(fetchSubCategoriesData, "fetchSubCategoriesData")
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (open) {
|
if (open) {
|
||||||
setSelectedValue(currentDefault);
|
setSelectedValue(currentDefault);
|
||||||
|
|
@ -25,7 +25,9 @@ const DefaultSettingPopover = memo(({ field, options, onSubmit, currentDefault,
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
||||||
const fetchAllSubCategories = async () => {
|
const fetchAllSubCategories = async () => {
|
||||||
|
|
||||||
await (dispatch(getActiveProdSubCatData({ AppId: getSession('AppId') })))?.unwrap();
|
await (dispatch(getActiveProdSubCatData({ AppId: getSession('AppId') })))?.unwrap();
|
||||||
|
setFetchSubCategoriesData(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fetchSubCategoriesData) {
|
if (fetchSubCategoriesData) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue