@visns-studio/visns-components 1.0.12 → 1.0.13
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,20 @@
|
|
|
1
|
-
import 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
|
|
|
9
|
+
console.info("a", url);
|
|
10
|
+
|
|
10
11
|
if (props.hasOwnProperty("setSettings") === true) {
|
|
12
|
+
console.info("b");
|
|
11
13
|
if (url && url !== "") {
|
|
14
|
+
console.info("c");
|
|
12
15
|
window.open(url);
|
|
13
16
|
} else {
|
|
17
|
+
console.info("d");
|
|
14
18
|
setSettings((prevState) => {
|
|
15
19
|
if (prevState.ajaxSetting) {
|
|
16
20
|
let _where = [];
|
|
@@ -102,13 +106,9 @@ function TableFilter(props) {
|
|
|
102
106
|
setFilters((prevState) => [...prevState]);
|
|
103
107
|
};
|
|
104
108
|
|
|
105
|
-
useEffect(() => {
|
|
106
|
-
setData(filters);
|
|
107
|
-
}, [filters]);
|
|
108
|
-
|
|
109
109
|
return (
|
|
110
110
|
<ul>
|
|
111
|
-
{
|
|
111
|
+
{filters.map((item, key) => (
|
|
112
112
|
<li key={"table-filter-" + key}>
|
|
113
113
|
<a
|
|
114
114
|
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.
|
|
35
|
+
"version": "1.0.13",
|
|
36
36
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
37
37
|
"main": "index.js",
|
|
38
38
|
"devDependencies": {},
|