ar-design 0.2.38 → 0.2.40
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.
|
@@ -369,9 +369,7 @@ const Table = forwardRef(({ children, title, description, data, columns, actions
|
|
|
369
369
|
c.filters && (React.createElement(Popover, { content: React.createElement("div", null, c.filters.map((filter, fIndex) => {
|
|
370
370
|
const name = typeof c.key !== "object" ? String(c.key) : String(c.key.field);
|
|
371
371
|
return (React.createElement("div", null,
|
|
372
|
-
React.createElement(Checkbox, { ref: (element) => (_filterCheckboxItems.current[fIndex] = element), label: filter.text, name: name, status: "primary",
|
|
373
|
-
// value={filter.value}
|
|
374
|
-
checked: checkboxSelectedParams?.[name]?.includes(String(filter.value)), onChange: async (event) => await handleCheckboxChange(event) })));
|
|
372
|
+
React.createElement(Checkbox, { ref: (element) => (_filterCheckboxItems.current[fIndex] = element), label: filter.text, name: name, status: "primary", value: filter.value, checked: checkboxSelectedParams?.[name]?.includes(String(filter.value)), onChange: async (event) => await handleCheckboxChange(event) })));
|
|
375
373
|
})), windowBlur: true },
|
|
376
374
|
React.createElement(Button, { variant: "borderless", icon: { element: React.createElement(ARIcon, { icon: "Filter", stroke: "var(--primary)", size: 16 }) } })))))));
|
|
377
375
|
})))),
|
|
@@ -24,6 +24,9 @@ class Api {
|
|
|
24
24
|
return response;
|
|
25
25
|
}
|
|
26
26
|
async Post(values) {
|
|
27
|
+
if (values.input && values.input.toString().includes("?")) {
|
|
28
|
+
values.input = values.input.toString().replace(/\/(?=\?)/, "");
|
|
29
|
+
}
|
|
27
30
|
const response = await this.CustomFetch(`${this._url}${values.input}`, {
|
|
28
31
|
method: "POST",
|
|
29
32
|
headers: { ...this.HeaderProperties(), ...values.headers },
|
|
@@ -33,6 +36,9 @@ class Api {
|
|
|
33
36
|
return response;
|
|
34
37
|
}
|
|
35
38
|
async PostWithFormData(values) {
|
|
39
|
+
if (values.input && values.input.toString().includes("?")) {
|
|
40
|
+
values.input = values.input.toString().replace(/\/(?=\?)/, "");
|
|
41
|
+
}
|
|
36
42
|
const response = await this.CustomFetch(`${this._url}${values.input}`, {
|
|
37
43
|
method: "POST",
|
|
38
44
|
headers: { ...this.HeaderProperties(), ...values.headers },
|
|
@@ -42,6 +48,9 @@ class Api {
|
|
|
42
48
|
return response;
|
|
43
49
|
}
|
|
44
50
|
async Put(values) {
|
|
51
|
+
if (values.input && values.input.toString().includes("?")) {
|
|
52
|
+
values.input = values.input.toString().replace(/\/(?=\?)/, "");
|
|
53
|
+
}
|
|
45
54
|
const response = await this.CustomFetch(`${this._url}${values.input}`, {
|
|
46
55
|
method: "PUT",
|
|
47
56
|
headers: {
|
|
@@ -54,6 +63,9 @@ class Api {
|
|
|
54
63
|
return response;
|
|
55
64
|
}
|
|
56
65
|
async Delete(values) {
|
|
66
|
+
if (values.input && values.input.toString().includes("?")) {
|
|
67
|
+
values.input = values.input.toString().replace(/\/(?=\?)/, "");
|
|
68
|
+
}
|
|
57
69
|
const response = await this.CustomFetch(`${this._url}${values.input}`, {
|
|
58
70
|
method: "DELETE",
|
|
59
71
|
headers: {
|