@pushwoosh/smart-components-kit 1.7.1 → 1.8.1
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.
|
@@ -14,14 +14,14 @@ export function DataTableSearchInput(props) {
|
|
|
14
14
|
return _jsx(SearchInput, {
|
|
15
15
|
...props,
|
|
16
16
|
value: inputValue,
|
|
17
|
-
"$onClear": () => {
|
|
17
|
+
"$onClear": inputValue ? () => {
|
|
18
18
|
setInputValue('');
|
|
19
19
|
context.onChangeParams({
|
|
20
20
|
...context.params,
|
|
21
21
|
search: '',
|
|
22
22
|
page: 1
|
|
23
23
|
});
|
|
24
|
-
},
|
|
24
|
+
} : undefined,
|
|
25
25
|
onChange: event => {
|
|
26
26
|
const value = event.target.value;
|
|
27
27
|
setInputValue(value);
|
|
@@ -5,6 +5,7 @@ import { DataTableContext } from '../../context';
|
|
|
5
5
|
export function DataTableSortableCell(props) {
|
|
6
6
|
const {
|
|
7
7
|
name,
|
|
8
|
+
isReversed,
|
|
8
9
|
children
|
|
9
10
|
} = props;
|
|
10
11
|
const {
|
|
@@ -14,11 +15,12 @@ export function DataTableSortableCell(props) {
|
|
|
14
15
|
return _jsx(SortButton, {
|
|
15
16
|
name: name,
|
|
16
17
|
order: params.order === name ? params.direction : null,
|
|
18
|
+
isReversed: isReversed,
|
|
17
19
|
onClick: sortParams => {
|
|
18
20
|
onChangeParams({
|
|
19
21
|
...params,
|
|
20
22
|
order: sortParams.name,
|
|
21
|
-
direction: sortParams.order || 'asc',
|
|
23
|
+
direction: sortParams.order || (isReversed ? 'desc' : 'asc'),
|
|
22
24
|
page: 1
|
|
23
25
|
});
|
|
24
26
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pushwoosh/smart-components-kit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"description": "Stateful, data-connected React components shared by Pushwoosh micro-frontends",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@floating-ui/react-dom": "^2.1.2",
|
|
20
|
-
"@pushwoosh/dumb-components": "^2.10.
|
|
20
|
+
"@pushwoosh/dumb-components": "^2.10.1",
|
|
21
21
|
"@pushwoosh/kit-constants": "^2.1.1",
|
|
22
22
|
"@pushwoosh/kit-helpers": "^4.13.0",
|
|
23
|
-
"@pushwoosh/kit-icons": "^2.3.
|
|
23
|
+
"@pushwoosh/kit-icons": "^2.3.10",
|
|
24
24
|
"@pushwoosh/kit-typography": "^1.9.0",
|
|
25
25
|
"@pushwoosh/rpc-v2-http-api-data": "^0.2.389",
|
|
26
|
-
"@pushwoosh/spa-context": "^
|
|
26
|
+
"@pushwoosh/spa-context": "^2.0.0",
|
|
27
27
|
"idb-keyval": "^6.2.2",
|
|
28
28
|
"jwt-decode": "^4.0.0",
|
|
29
29
|
"react-hook-form": "^7.68.0",
|