datastake-daf 0.6.232 → 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.
@@ -9898,7 +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 _app = config?.app || app;
9901
+ const isFilter = config?.isOnFilter || false;
9902
9902
  const disabled = React.useMemo(() => typeof config.disabled === "function" ? config.disabled(filters) : true, [config, filters]);
9903
9903
  const value = React.useMemo(() => filters[k] || null, [k, filters]);
9904
9904
  const label = React.useMemo(() => {
@@ -9911,8 +9911,8 @@ const AjaxSelect$2 = ({
9911
9911
  React.useEffect(() => {
9912
9912
  if (Object.keys(lastFilterValues) && !disabled) {
9913
9913
  getAjaxData({
9914
- apiUrl,
9915
- app: _app,
9914
+ apiUrl: isFilter ? config.filtersConfig?.apiUrl : apiUrl,
9915
+ app: isFilter ? config.filtersConfig?.app : app,
9916
9916
  entity: config.entity,
9917
9917
  filterValues: lastFilterValues,
9918
9918
  mapper: config.mapper,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.232",
3
+ "version": "0.6.233",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.2.5",
6
6
  "@antv/g2": "^5.1.1",
@@ -53,7 +53,7 @@ export const AjaxSelect = ({
53
53
  [config, filters]
54
54
  );
55
55
  const [lastFilterValues, setLastFilterValues] = useState(filterValues);
56
- const _app = config?.app || app;
56
+ const isFilter = config?.isOnFilter || false;
57
57
 
58
58
  const disabled = useMemo(
59
59
  () =>
@@ -73,8 +73,8 @@ export const AjaxSelect = ({
73
73
  useEffect(() => {
74
74
  if (Object.keys(lastFilterValues) && !disabled) {
75
75
  getAjaxData({
76
- apiUrl,
77
- app: _app,
76
+ apiUrl: isFilter ? config.filtersConfig?.apiUrl : apiUrl,
77
+ app: isFilter ? config.filtersConfig?.app : app,
78
78
  entity: config.entity,
79
79
  filterValues: lastFilterValues,
80
80
  mapper: config.mapper,