@rufous/ui 0.3.27 → 0.3.29

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/main.cjs CHANGED
@@ -4980,6 +4980,8 @@ function DataGrid({
4980
4980
  });
4981
4981
  (0, import_react23.useEffect)(() => {
4982
4982
  onFiltersChangeRef.current?.(advancedFilters);
4983
+ setCurrentPage(1);
4984
+ if (onPaginationModelChange) onPaginationModelChange({ page: 0, pageSize: activePageSize });
4983
4985
  }, [advancedFilters]);
4984
4986
  const handleSort = (fieldKey, dir) => {
4985
4987
  if (dir !== void 0) {
@@ -9973,6 +9975,11 @@ function SmartSelect({
9973
9975
  const key = getValue(value);
9974
9976
  if (!base.some((o) => getValue(o) === key)) base = [value, ...base];
9975
9977
  }
9978
+ if (multiple && Array.isArray(value) && value.length > 0) {
9979
+ const baseKeys = new Set(base.map((o) => getValue(o)));
9980
+ const missing = value.filter((v) => !baseKeys.has(getValue(v)));
9981
+ if (missing.length > 0) base = [...base, ...missing];
9982
+ }
9976
9983
  return base;
9977
9984
  }, [flatOptionsList, searchResults, getValue, value, multiple]);
9978
9985
  const depthMap = (0, import_react51.useMemo)(() => {
package/dist/main.js CHANGED
@@ -4837,6 +4837,8 @@ function DataGrid({
4837
4837
  });
4838
4838
  useEffect9(() => {
4839
4839
  onFiltersChangeRef.current?.(advancedFilters);
4840
+ setCurrentPage(1);
4841
+ if (onPaginationModelChange) onPaginationModelChange({ page: 0, pageSize: activePageSize });
4840
4842
  }, [advancedFilters]);
4841
4843
  const handleSort = (fieldKey, dir) => {
4842
4844
  if (dir !== void 0) {
@@ -9899,6 +9901,11 @@ function SmartSelect({
9899
9901
  const key = getValue(value);
9900
9902
  if (!base.some((o) => getValue(o) === key)) base = [value, ...base];
9901
9903
  }
9904
+ if (multiple && Array.isArray(value) && value.length > 0) {
9905
+ const baseKeys = new Set(base.map((o) => getValue(o)));
9906
+ const missing = value.filter((v) => !baseKeys.has(getValue(v)));
9907
+ if (missing.length > 0) base = [...base, ...missing];
9908
+ }
9902
9909
  return base;
9903
9910
  }, [flatOptionsList, searchResults, getValue, value, multiple]);
9904
9911
  const depthMap = useMemo3(() => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rufous/ui",
3
3
  "private": false,
4
- "version": "0.3.27",
4
+ "version": "0.3.29",
5
5
  "type": "module",
6
6
  "description": "Experimental: A lightweight React UI component library (Beta)",
7
7
  "style": "./dist/main.css",