datastake-daf 0.6.231 → 0.6.233
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/components/index.js
CHANGED
|
@@ -9898,6 +9898,7 @@ const AjaxSelect$2 = ({
|
|
|
9898
9898
|
const [initFetch, setInitFetch] = React.useState(false);
|
|
9899
9899
|
const filterValues = React.useMemo(() => typeof config.filters === "function" ? config.filters(filters) : {}, [config, filters]);
|
|
9900
9900
|
const [lastFilterValues, setLastFilterValues] = React.useState(filterValues);
|
|
9901
|
+
const isFilter = config?.isOnFilter || false;
|
|
9901
9902
|
const disabled = React.useMemo(() => typeof config.disabled === "function" ? config.disabled(filters) : true, [config, filters]);
|
|
9902
9903
|
const value = React.useMemo(() => filters[k] || null, [k, filters]);
|
|
9903
9904
|
const label = React.useMemo(() => {
|
|
@@ -9910,8 +9911,8 @@ const AjaxSelect$2 = ({
|
|
|
9910
9911
|
React.useEffect(() => {
|
|
9911
9912
|
if (Object.keys(lastFilterValues) && !disabled) {
|
|
9912
9913
|
getAjaxData({
|
|
9913
|
-
apiUrl,
|
|
9914
|
-
app,
|
|
9914
|
+
apiUrl: isFilter ? config.filtersConfig?.apiUrl : apiUrl,
|
|
9915
|
+
app: isFilter ? config.filtersConfig?.app : app,
|
|
9915
9916
|
entity: config.entity,
|
|
9916
9917
|
filterValues: lastFilterValues,
|
|
9917
9918
|
mapper: config.mapper,
|
package/package.json
CHANGED
|
@@ -53,6 +53,7 @@ export const AjaxSelect = ({
|
|
|
53
53
|
[config, filters]
|
|
54
54
|
);
|
|
55
55
|
const [lastFilterValues, setLastFilterValues] = useState(filterValues);
|
|
56
|
+
const isFilter = config?.isOnFilter || false;
|
|
56
57
|
|
|
57
58
|
const disabled = useMemo(
|
|
58
59
|
() =>
|
|
@@ -72,8 +73,8 @@ export const AjaxSelect = ({
|
|
|
72
73
|
useEffect(() => {
|
|
73
74
|
if (Object.keys(lastFilterValues) && !disabled) {
|
|
74
75
|
getAjaxData({
|
|
75
|
-
apiUrl,
|
|
76
|
-
app,
|
|
76
|
+
apiUrl: isFilter ? config.filtersConfig?.apiUrl : apiUrl,
|
|
77
|
+
app: isFilter ? config.filtersConfig?.app : app,
|
|
77
78
|
entity: config.entity,
|
|
78
79
|
filterValues: lastFilterValues,
|
|
79
80
|
mapper: config.mapper,
|