@visns-studio/visns-components 1.2.7 → 1.2.9
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.
|
@@ -28,7 +28,6 @@ import "react-confirm-alert/src/react-confirm-alert.css";
|
|
|
28
28
|
|
|
29
29
|
import CustomFetch from "./visns-fetch";
|
|
30
30
|
import Form from "./visns-form";
|
|
31
|
-
import { NonceProvider } from "react-select";
|
|
32
31
|
|
|
33
32
|
const loadData = async (
|
|
34
33
|
{ skip, limit, sortInfo, currentData, filterValue, groupBy },
|
|
@@ -48,15 +47,17 @@ const loadData = async (
|
|
|
48
47
|
params.where = ajaxSetting.where;
|
|
49
48
|
}
|
|
50
49
|
|
|
51
|
-
filterValue
|
|
52
|
-
|
|
50
|
+
if (filterValue) {
|
|
51
|
+
filterValue.forEach((fv) => {
|
|
52
|
+
const identifier = fv.key ? fv.key : fv.name;
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
if (fv.value !== null && fv.value !== "") {
|
|
55
|
+
params.where.push({ id: identifier, value: fv.value });
|
|
56
|
+
} else {
|
|
57
|
+
params.where = params.where.filter((w) => w.id !== identifier);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
60
61
|
|
|
61
62
|
try {
|
|
62
63
|
const response = await axios.post(url, params);
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from "react";
|
|
2
2
|
|
|
3
3
|
function Select(props) {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const { className, dataOptions, inputValue, onChange, options, settings } =
|
|
5
|
+
props;
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
7
|
+
return (
|
|
8
|
+
<select
|
|
9
|
+
name={settings.id}
|
|
10
|
+
className={className}
|
|
11
|
+
onChange={onChange}
|
|
12
|
+
value={inputValue}
|
|
13
|
+
data-show={settings.show ? JSON.stringify(settings.show) : ""}
|
|
14
|
+
>
|
|
15
|
+
<option>Please select an option</option>
|
|
16
|
+
{options.map((item, index) => (
|
|
17
|
+
<option
|
|
18
|
+
key={settings.id + "-" + item.id}
|
|
19
|
+
value={item.id}
|
|
20
|
+
{...dataOptions[index]}
|
|
21
|
+
>
|
|
22
|
+
{item.label}
|
|
23
|
+
</option>
|
|
24
|
+
))}
|
|
25
|
+
</select>
|
|
26
|
+
);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export default Select;
|
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.2.
|
|
37
|
+
"version": "1.2.9",
|
|
38
38
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
39
39
|
"main": "index.js",
|
|
40
40
|
"devDependencies": {},
|