@algorithm-shift/design-system 1.3.116 → 1.3.117
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/client.js +2 -0
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +2 -0
- package/dist/client.mjs.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1972,6 +1972,9 @@ function useLazyDropdown(config) {
|
|
|
1972
1972
|
const parts = path.split(/\./);
|
|
1973
1973
|
return parts.reduce((acc, key) => acc?.[key], obj);
|
|
1974
1974
|
}
|
|
1975
|
+
function isEmptyParamValue(value) {
|
|
1976
|
+
return value === "" || value === void 0 || value === null || value === "null" || value === "undefined";
|
|
1977
|
+
}
|
|
1975
1978
|
const transformToOptions = useCallback2((data) => {
|
|
1976
1979
|
if (!data || !Array.isArray(data)) return [];
|
|
1977
1980
|
const cfg = configRef.current;
|
|
@@ -1996,7 +1999,7 @@ function useLazyDropdown(config) {
|
|
|
1996
1999
|
let hasEmpty = false;
|
|
1997
2000
|
const baseUrl = urlObj.origin + urlObj.pathname;
|
|
1998
2001
|
urlObj.searchParams.forEach((value, key) => {
|
|
1999
|
-
const isEmpty = value
|
|
2002
|
+
const isEmpty = isEmptyParamValue(value);
|
|
2000
2003
|
if (isEmpty) {
|
|
2001
2004
|
hasEmpty = true;
|
|
2002
2005
|
if (enforceStrict) return;
|
|
@@ -2173,7 +2176,9 @@ function useLazyDropdown(config) {
|
|
|
2173
2176
|
);
|
|
2174
2177
|
const queryParams = {};
|
|
2175
2178
|
urlObj.searchParams.forEach((value, key) => {
|
|
2176
|
-
|
|
2179
|
+
if (!isEmptyParamValue(value)) {
|
|
2180
|
+
queryParams[key] = value;
|
|
2181
|
+
}
|
|
2177
2182
|
});
|
|
2178
2183
|
const body = {
|
|
2179
2184
|
...queryParams,
|