datastake-daf 0.6.232 → 0.6.234
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,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
|
|
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:
|
|
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,
|
|
@@ -12021,9 +12021,9 @@ const SearchFilters = _ref => {
|
|
|
12021
12021
|
};
|
|
12022
12022
|
const openIfClosed = () => {
|
|
12023
12023
|
};
|
|
12024
|
-
return /*#__PURE__*/jsxRuntime.
|
|
12024
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
12025
12025
|
className: formatClassname(['daf-search-filters', hasError && 'error', className]),
|
|
12026
|
-
children:
|
|
12026
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
12027
12027
|
className: "input-container",
|
|
12028
12028
|
ref: ref,
|
|
12029
12029
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
@@ -12069,20 +12069,7 @@ const SearchFilters = _ref => {
|
|
|
12069
12069
|
children: t('Oops, looks like there are no search matches. Please try again!')
|
|
12070
12070
|
})]
|
|
12071
12071
|
})]
|
|
12072
|
-
})
|
|
12073
|
-
className: "flex flex-column",
|
|
12074
|
-
children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
|
|
12075
|
-
className: "ml-3 flex-1 squareIconButton no-min-width",
|
|
12076
|
-
onClick: () => {
|
|
12077
|
-
setShowFilters(p => !p);
|
|
12078
|
-
},
|
|
12079
|
-
icon: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
|
|
12080
|
-
name: "Filter",
|
|
12081
|
-
width: 16,
|
|
12082
|
-
height: 16
|
|
12083
|
-
})
|
|
12084
|
-
})
|
|
12085
|
-
})]
|
|
12072
|
+
})
|
|
12086
12073
|
});
|
|
12087
12074
|
};
|
|
12088
12075
|
SearchFilters.propTypes = {
|
package/package.json
CHANGED
|
@@ -171,7 +171,7 @@ const SearchFilters = ({
|
|
|
171
171
|
</div>
|
|
172
172
|
)}
|
|
173
173
|
</div>
|
|
174
|
-
{showFilter && (
|
|
174
|
+
{/* {showFilter && (
|
|
175
175
|
<div className='flex flex-column'>
|
|
176
176
|
<Button
|
|
177
177
|
className="ml-3 flex-1 squareIconButton no-min-width"
|
|
@@ -180,12 +180,9 @@ const SearchFilters = ({
|
|
|
180
180
|
}}
|
|
181
181
|
icon={<CustomIcon name='Filter' width={16} height={16} />}
|
|
182
182
|
>
|
|
183
|
-
{/* <div className='flex flex-column justify-content-center'>
|
|
184
|
-
<CustomIcon name='Filter' width={16} height={16} />
|
|
185
|
-
</div> */}
|
|
186
183
|
</Button>
|
|
187
184
|
</div>
|
|
188
|
-
)}
|
|
185
|
+
)} */}
|
|
189
186
|
</div>
|
|
190
187
|
);
|
|
191
188
|
};
|
|
@@ -53,7 +53,7 @@ export const AjaxSelect = ({
|
|
|
53
53
|
[config, filters]
|
|
54
54
|
);
|
|
55
55
|
const [lastFilterValues, setLastFilterValues] = useState(filterValues);
|
|
56
|
-
const
|
|
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:
|
|
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,
|