@algorithm-shift/design-system 1.3.115 → 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/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 === "" || value === void 0 || value === null;
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
- queryParams[key] = value;
2179
+ if (!isEmptyParamValue(value)) {
2180
+ queryParams[key] = value;
2181
+ }
2177
2182
  });
2178
2183
  const body = {
2179
2184
  ...queryParams,
@@ -4339,14 +4344,15 @@ function DataTable({
4339
4344
  Button,
4340
4345
  {
4341
4346
  size: "sm",
4342
- className: "bg-[#12715B] text-white text-xs h-auto py-2 px-3 cursor-pointer",
4347
+ variant: "outline",
4348
+ className: "px-3 py-1 text-xs cursor-pointer border-gray-300",
4343
4349
  onClick: async () => {
4344
4350
  setFetchLoading(true);
4345
4351
  await getRowCount?.();
4346
4352
  setFetchLoading(false);
4347
4353
  },
4348
4354
  disabled: fetchLoading,
4349
- children: fetchLoading ? "Fetching..." : "Get Total Records"
4355
+ children: fetchLoading ? "Fetching..." : "Get Count"
4350
4356
  }
4351
4357
  ),
4352
4358
  globalSearch && /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-2 w-full max-w-sm", children: [