@rh-support/cases 2.1.29 → 2.1.30
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountsFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/AccountsFilter.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAe1F,UAAU,MAAM;IACZ,uBAAuB,EAAE,OAAO,CAAC;CACpC;AAED,eAAO,MAAM,gCAAgC,YAAa,QAAQ,WAMjE,CAAC;AACF,eAAO,MAAM,+BAA+B,YAAa,QAAQ,sBAAsB,CAAC,WAEvF,CAAC;AAEF,eAAO,MAAM,QAAQ,0CACyD,CAAC;AAE/E,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"AccountsFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/AccountsFilter.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAe1F,UAAU,MAAM;IACZ,uBAAuB,EAAE,OAAO,CAAC;CACpC;AAED,eAAO,MAAM,gCAAgC,YAAa,QAAQ,WAMjE,CAAC;AACF,eAAO,MAAM,+BAA+B,YAAa,QAAQ,sBAAsB,CAAC,WAEvF,CAAC;AAEF,eAAO,MAAM,QAAQ,0CACyD,CAAC;AAE/E,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,eA+F3C"}
|
|
@@ -14,7 +14,7 @@ import differenceBy from 'lodash/differenceBy';
|
|
|
14
14
|
import filter from 'lodash/filter';
|
|
15
15
|
import remove from 'lodash/remove';
|
|
16
16
|
import uniqBy from 'lodash/uniqBy';
|
|
17
|
-
import React, { useContext, useEffect } from 'react';
|
|
17
|
+
import React, { useContext, useEffect, useMemo } from 'react';
|
|
18
18
|
import { Trans, useTranslation } from 'react-i18next';
|
|
19
19
|
import { SolrKeys } from '../../../enums/filters';
|
|
20
20
|
import { CaseListFilterDispatchContext, CaseListFilterStateContext } from '../CaseListFilterContext';
|
|
@@ -35,12 +35,14 @@ export function AccountsFilter(props) {
|
|
|
35
35
|
const { canReadBookmarkAccounts } = props;
|
|
36
36
|
const { filterInfo } = useContext(CaseListFilterStateContext);
|
|
37
37
|
const dispatch = useContext(CaseListFilterDispatchContext);
|
|
38
|
-
const selectedAccounts = filterInfo[SolrKeys.accountNumber]
|
|
38
|
+
const selectedAccounts = useMemo(() => filterInfo[SolrKeys.accountNumber]
|
|
39
39
|
.filter((item) => !Array.isArray(item.key))
|
|
40
40
|
.map((item) => ({
|
|
41
41
|
name: item.value,
|
|
42
42
|
accountNumber: item.key,
|
|
43
|
-
}))
|
|
43
|
+
})),
|
|
44
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
45
|
+
[filterInfo, filterInfo[SolrKeys.accountNumber]]);
|
|
44
46
|
const onAccountsFilterChange = (selected) => {
|
|
45
47
|
const toAdd = differenceBy(selected, selectedAccounts, 'accountNumber');
|
|
46
48
|
const toRemove = differenceBy(selectedAccounts, selected, 'accountNumber');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/cases",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.30",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@patternfly/react-core": "5.1.1",
|
|
48
48
|
"@patternfly/react-table": "5.1.1",
|
|
49
49
|
"@rh-support/components": "2.1.26",
|
|
50
|
-
"@rh-support/react-context": "2.1.
|
|
50
|
+
"@rh-support/react-context": "2.1.29",
|
|
51
51
|
"@rh-support/types": "2.0.2",
|
|
52
52
|
"@rh-support/user-permissions": "2.1.19",
|
|
53
53
|
"@rh-support/utils": "2.1.12",
|
|
@@ -93,5 +93,5 @@
|
|
|
93
93
|
"defaults and supports es6-module",
|
|
94
94
|
"maintained node versions"
|
|
95
95
|
],
|
|
96
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "ed9cba460bdbf0d0104fe6e8f21a0ca554bdaee8"
|
|
97
97
|
}
|