@visns-studio/visns-components 2.7.9 → 2.7.11

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.
@@ -1892,12 +1892,26 @@ const DataGrid = forwardRef(
1892
1892
  useEffect(() => {
1893
1893
  columns.forEach((column) => {
1894
1894
  if (column.filter && column.filter.url) {
1895
+ let filterWhere = {};
1896
+
1897
+ if (column.filter.where) {
1898
+ filterWhere = {
1899
+ ...filterWhere,
1900
+ where: column.filter.where,
1901
+ };
1902
+ }
1903
+
1904
+ if (column.filter.fields) {
1905
+ filterWhere = {
1906
+ ...filterWhere,
1907
+ fields: column.filter.fields,
1908
+ };
1909
+ }
1910
+
1895
1911
  CustomFetch(
1896
1912
  column.filter.url,
1897
1913
  'POST',
1898
- column.filter.where
1899
- ? { where: column.filter.where }
1900
- : {},
1914
+ filterWhere,
1901
1915
  (res) => {
1902
1916
  let filterName;
1903
1917
  if (Array.isArray(column.id)) {
@@ -65,6 +65,10 @@ function Field({
65
65
  };
66
66
  }
67
67
 
68
+ if (settings.fields?.length > 0) {
69
+ filter.fields = settings.fields;
70
+ }
71
+
68
72
  CustomFetch(settings.url, 'POST', filter, function (result) {
69
73
  setOptions(result.data);
70
74
 
package/package.json CHANGED
@@ -44,7 +44,7 @@
44
44
  "react-dom": "^17.0.1"
45
45
  },
46
46
  "name": "@visns-studio/visns-components",
47
- "version": "2.7.9",
47
+ "version": "2.7.11",
48
48
  "description": "Various packages to assist in the development of our Custom Applications.",
49
49
  "main": "index.js",
50
50
  "scripts": {