@visns-studio/visns-components 1.3.11 → 1.3.12

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.
@@ -831,9 +831,38 @@ const DataGrid = forwardRef(
831
831
  type: "number",
832
832
  };
833
833
  case "option":
834
+ selectedDataSource = filterDataSource.reduce(
835
+ (acc, fds) => {
836
+ if (fds.id === column.id) {
837
+ return fds.dataset;
838
+ }
839
+ return acc;
840
+ },
841
+ null
842
+ );
843
+
844
+ if (
845
+ column.filter &&
846
+ column.filter.type &&
847
+ column.filter.type === "select"
848
+ ) {
849
+ filterEditor = SelectFilter;
850
+ filterEditorProps = {
851
+ placeholder: column.filter.placeholder
852
+ ? column.filter.placeholder
853
+ : "All Options",
854
+ dataSource: selectedDataSource,
855
+ };
856
+ } else {
857
+ filterEditor = null;
858
+ filterEditorProps = null;
859
+ }
860
+
834
861
  return {
835
862
  ...commonProps,
836
863
  name: column.id,
864
+ filterEditor: filterEditor,
865
+ filterEditorProps: filterEditorProps,
837
866
  render: ({ data }) => {
838
867
  if (
839
868
  data &&
package/package.json CHANGED
@@ -34,7 +34,7 @@
34
34
  "react-dom": "^17.0.1"
35
35
  },
36
36
  "name": "@visns-studio/visns-components",
37
- "version": "1.3.11",
37
+ "version": "1.3.12",
38
38
  "description": "Various packages to assist in the development of our Custom Applications.",
39
39
  "main": "index.js",
40
40
  "devDependencies": {},