@visns-studio/visns-components 2.3.9 → 2.3.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.
@@ -133,6 +133,10 @@ const DataGrid = ({
133
133
  setModalShow(false);
134
134
  };
135
135
 
136
+ useEffect(() => {
137
+ setFormData(form);
138
+ }, [form]);
139
+
136
140
  /** Table States */
137
141
  const [dataReload, setDataReload] = useState(0);
138
142
  const [dSearch, setDSearch] = useState('');
@@ -263,51 +267,58 @@ const DataGrid = ({
263
267
  setDataReload(randomNumber);
264
268
  };
265
269
 
266
- const onRowClick = useCallback((rowProps, event) => {
267
- const cellElement = event.target.closest('.InovuaReactDataGrid__cell');
268
- const columnIndex = Array.from(cellElement.parentNode.children).indexOf(
269
- cellElement
270
- );
271
-
272
- let proceed = true;
273
-
274
- columns.forEach((a, b) => {
275
- if (
276
- a.id === rowProps.columns[columnIndex].id &&
277
- a.type === 'toggle'
278
- ) {
279
- proceed = false;
280
- }
281
- });
270
+ const onRowClick = useCallback(
271
+ (rowProps, event) => {
272
+ const cellElement = event.target.closest(
273
+ '.InovuaReactDataGrid__cell'
274
+ );
275
+ const columnIndex = Array.from(
276
+ cellElement.parentNode.children
277
+ ).indexOf(cellElement);
278
+
279
+ let proceed = true;
280
+
281
+ columns.forEach((a, b) => {
282
+ if (
283
+ a.id === rowProps.columns[columnIndex].id &&
284
+ a.type === 'toggle'
285
+ ) {
286
+ proceed = false;
287
+ }
288
+ });
282
289
 
283
- if (proceed) {
284
- if (
285
- rowProps.columns[columnIndex].link &&
286
- rowProps.columns[columnIndex].link.url
287
- ) {
288
- if (rowProps.columns[columnIndex].link.folder) {
289
- window.location.href =
290
- rowProps.columns[columnIndex].link.url +
291
- rowProps.data[rowProps.columns[columnIndex].link.key] +
292
- '/' +
293
- rowProps.columns[columnIndex].link.folder;
294
- } else {
295
- navigate(
296
- `${rowProps.columns[columnIndex].link.url}${
290
+ if (proceed) {
291
+ if (
292
+ rowProps.columns[columnIndex].link &&
293
+ rowProps.columns[columnIndex].link.url
294
+ ) {
295
+ if (rowProps.columns[columnIndex].link.folder) {
296
+ window.location.href =
297
+ rowProps.columns[columnIndex].link.url +
297
298
  rowProps.data[
298
299
  rowProps.columns[columnIndex].link.key
299
- ]
300
- }`,
301
- {
302
- state: {
303
- form: form,
304
- },
305
- }
306
- );
300
+ ] +
301
+ '/' +
302
+ rowProps.columns[columnIndex].link.folder;
303
+ } else {
304
+ navigate(
305
+ `${rowProps.columns[columnIndex].link.url}${
306
+ rowProps.data[
307
+ rowProps.columns[columnIndex].link.key
308
+ ]
309
+ }`,
310
+ {
311
+ state: {
312
+ form: form,
313
+ },
314
+ }
315
+ );
316
+ }
307
317
  }
308
318
  }
309
- }
310
- }, []);
319
+ },
320
+ [form]
321
+ );
311
322
 
312
323
  const onRenderRow = useCallback((rowProps) => {
313
324
  // save the original handlers to be called later
package/package.json CHANGED
@@ -6,8 +6,8 @@
6
6
  "array-move": "^4.0.0",
7
7
  "awesome-debounce-promise": "^2.1.0",
8
8
  "axios": "^1.4.0",
9
- "framer-motion": "^10.15.1",
10
- "html-react-parser": "^4.2.0",
9
+ "framer-motion": "^10.15.2",
10
+ "html-react-parser": "^4.2.1",
11
11
  "lodash": "^4.17.21",
12
12
  "moment": "^2.29.4",
13
13
  "motion": "^10.16.2",
@@ -17,7 +17,7 @@
17
17
  "react-confirm-alert": "^3.0.6",
18
18
  "react-datepicker": "^4.16.0",
19
19
  "react-dropzone": "^14.2.3",
20
- "react-number-format": "^5.2.2",
20
+ "react-number-format": "^5.3.0",
21
21
  "react-password-strength-bar": "^0.4.1",
22
22
  "react-promise-tracker": "^2.1.1",
23
23
  "react-quill": "^2.0.0",
@@ -42,7 +42,7 @@
42
42
  "react-dom": "^17.0.1"
43
43
  },
44
44
  "name": "@visns-studio/visns-components",
45
- "version": "2.3.9",
45
+ "version": "2.3.11",
46
46
  "description": "Various packages to assist in the development of our Custom Applications.",
47
47
  "main": "index.js",
48
48
  "scripts": {