|
7 | 7 | import deepEqual from 'fast-deep-equal'; |
8 | 8 | import { noop } from 'lodash/fp'; |
9 | 9 | import { useCallback, useEffect, useRef, useState } from 'react'; |
10 | | -import { useSelector } from 'react-redux'; |
11 | 10 |
|
12 | 11 | import { DEFAULT_INDEX_KEY } from '../../../../common/constants'; |
13 | 12 | import { HostsEdges, PageInfoPaginated } from '../../../graphql/types'; |
14 | 13 | import { inputsModel, State } from '../../../common/store'; |
15 | 14 | import { createFilter } from '../../../common/containers/helpers'; |
16 | 15 | import { useKibana } from '../../../common/lib/kibana'; |
| 16 | +import { useShallowEqualSelector } from '../../../common/hooks/use_selector'; |
17 | 17 | import { hostsModel, hostsSelectors } from '../../store'; |
18 | 18 | import { generateTablePaginationOptions } from '../../../common/components/paginated_table/helpers'; |
19 | 19 | import { |
@@ -59,7 +59,7 @@ export const useAllHost = ({ |
59 | 59 | type, |
60 | 60 | }: UseAllHost): [boolean, HostsArgs] => { |
61 | 61 | const getHostsSelector = hostsSelectors.hostsSelector(); |
62 | | - const { activePage, direction, limit, sortField } = useSelector((state: State) => |
| 62 | + const { activePage, direction, limit, sortField } = useShallowEqualSelector((state: State) => |
63 | 63 | getHostsSelector(state, type) |
64 | 64 | ); |
65 | 65 | const { data, notifications, uiSettings } = useKibana().services; |
|
0 commit comments