@visns-studio/visns-components 1.3.16 → 1.4.2

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.
@@ -292,9 +292,6 @@ const DataGrid = ({
292
292
  onClick(event);
293
293
  }
294
294
  };
295
-
296
- // add a CSS class to rowProps
297
- rowProps.className = "vs-datagrid--row";
298
295
  }, []);
299
296
 
300
297
  /** Table Hooks */
@@ -1201,14 +1198,25 @@ const DataGrid = ({
1201
1198
  <ReactDataGrid
1202
1199
  columns={gridColumns}
1203
1200
  dataSource={data}
1201
+ filterValue={filterValue}
1204
1202
  defaultLimit={limit}
1205
1203
  defaultSortInfo={sortInfo}
1206
1204
  enableColumnAutosize={false}
1207
- idProperty="uniqueId"
1208
- style={gridStyle}
1205
+ enableColumnFilterContextMenu={false}
1206
+ enableSelection={false}
1207
+ headerProps={headerProps}
1208
+ idProperty={`visns-datagrid-${ajaxSetting.url.replace(
1209
+ /\//g,
1210
+ "-"
1211
+ )}`}
1212
+ minRowHeight={40}
1213
+ onFilterValueChange={setFilterValue}
1209
1214
  onRenderRow={onRenderRow}
1210
1215
  pagination
1211
1216
  renderColumnContextMenu={renderColumnContextMenu}
1217
+ rowHeight={null}
1218
+ showZebraRows={true}
1219
+ style={gridStyle}
1212
1220
  />
1213
1221
  <Popup
1214
1222
  open={modalShow}
@@ -25,23 +25,32 @@ function Form(props) {
25
25
 
26
26
  const handleChange = (e) => {
27
27
  if (e) {
28
+ const { name, value } = e.target;
29
+
28
30
  switch (e.target.name) {
29
31
  case "title":
30
32
  setData((prevState) => ({
31
33
  ...prevState,
32
- [e.target.name]: e.target.value,
34
+ [name]: value,
33
35
  }));
34
36
 
35
37
  setData((prevState) => ({
36
38
  ...prevState,
37
- slug: slugify(e.target.value),
39
+ slug: slugify(value),
38
40
  }));
39
41
  break;
40
42
  default:
41
- setData((prevState) => ({
42
- ...prevState,
43
- [e.target.name]: e.target.value,
44
- }));
43
+ if (name) {
44
+ setData((prevState) => ({
45
+ ...prevState,
46
+ [name]: value,
47
+ }));
48
+ } else {
49
+ setData((prevState) => ({
50
+ ...prevState,
51
+ [e.target.dataset.name]: value,
52
+ }));
53
+ }
45
54
  break;
46
55
  }
47
56
  }
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.16",
37
+ "version": "1.4.2",
38
38
  "description": "Various packages to assist in the development of our Custom Applications.",
39
39
  "main": "index.js",
40
40
  "devDependencies": {},