@blocklet/list 0.11.14 → 0.11.15
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.
- package/lib/contexts/filter.js +4 -3
- package/package.json +2 -2
- package/src/contexts/filter.js +2 -1
package/lib/contexts/filter.js
CHANGED
|
@@ -50,8 +50,10 @@ function FilterProvider(_ref) {
|
|
|
50
50
|
}
|
|
51
51
|
const storeApi = (0, _react.useMemo)(() => {
|
|
52
52
|
return _axios.default.create({
|
|
53
|
-
baseURL: endpoint
|
|
53
|
+
baseURL: endpoint,
|
|
54
|
+
headers: requestHeaders
|
|
54
55
|
});
|
|
56
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
55
57
|
}, [endpoint]);
|
|
56
58
|
const finalFilters = (0, _react.useMemo)(() => {
|
|
57
59
|
return _objectSpread({
|
|
@@ -85,8 +87,7 @@ function FilterProvider(_ref) {
|
|
|
85
87
|
const {
|
|
86
88
|
data = {}
|
|
87
89
|
} = await storeApi.get(_constant.default.blockletsPath, {
|
|
88
|
-
params
|
|
89
|
-
headers: requestHeaders
|
|
90
|
+
params
|
|
90
91
|
});
|
|
91
92
|
return {
|
|
92
93
|
list: (data === null || data === void 0 ? void 0 : data.dataList) || [],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/list",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.15",
|
|
4
4
|
"description": "Common ux components of blocklet",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"eslint": "^8.22.0",
|
|
71
71
|
"prettier": "^2.7.1"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "d204f23872f8f597ff7465d5511e477e36e5ed72"
|
|
74
74
|
}
|
package/src/contexts/filter.js
CHANGED
|
@@ -36,7 +36,9 @@ function FilterProvider({
|
|
|
36
36
|
const storeApi = useMemo(() => {
|
|
37
37
|
return axios.create({
|
|
38
38
|
baseURL: endpoint,
|
|
39
|
+
headers: requestHeaders,
|
|
39
40
|
});
|
|
41
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
40
42
|
}, [endpoint]);
|
|
41
43
|
|
|
42
44
|
const finalFilters = useMemo(() => {
|
|
@@ -70,7 +72,6 @@ function FilterProvider({
|
|
|
70
72
|
|
|
71
73
|
const { data = {} } = await storeApi.get(constant.blockletsPath, {
|
|
72
74
|
params,
|
|
73
|
-
headers: requestHeaders,
|
|
74
75
|
});
|
|
75
76
|
return { list: data?.dataList || [], total: data?.total || 0 };
|
|
76
77
|
},
|