@visns-studio/visns-components 1.0.12 → 1.0.14

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.
@@ -1,16 +1,15 @@
1
- import React, { useState, useEffect } from "react";
1
+ import React from "react";
2
2
 
3
3
  function TableFilter(props) {
4
4
  const { filters, setFilters, setSettings } = props;
5
- const [data, setData] = useState([]);
6
5
 
7
6
  const filterTable = (e) => {
8
7
  const { id, value, url } = e.target.dataset;
9
8
 
10
- if (props.hasOwnProperty("setSettings") === true) {
11
- if (url && url !== "") {
12
- window.open(url);
13
- } else {
9
+ if (url && url !== "") {
10
+ window.open(url);
11
+ } else {
12
+ if (props.hasOwnProperty("setSettings") === true) {
14
13
  setSettings((prevState) => {
15
14
  if (prevState.ajaxSetting) {
16
15
  let _where = [];
@@ -102,13 +101,9 @@ function TableFilter(props) {
102
101
  setFilters((prevState) => [...prevState]);
103
102
  };
104
103
 
105
- useEffect(() => {
106
- setData(filters);
107
- }, [filters]);
108
-
109
104
  return (
110
105
  <ul>
111
- {data.map((item, key) => (
106
+ {filters.map((item, key) => (
112
107
  <li key={"table-filter-" + key}>
113
108
  <a
114
109
  data-id={item.id}
package/package.json CHANGED
@@ -32,7 +32,7 @@
32
32
  "react-dom": ">=18.2.0"
33
33
  },
34
34
  "name": "@visns-studio/visns-components",
35
- "version": "1.0.12",
35
+ "version": "1.0.14",
36
36
  "description": "Various packages to assist in the development of our Custom Applications.",
37
37
  "main": "index.js",
38
38
  "devDependencies": {},