Merge remote-tracking branch 'origin/bugfix/infinite-scroll-issues' into bugfix/infinite-scroll-issues

This commit is contained in:
Aleksandr Lushkin 2024-05-29 11:08:13 +02:00
commit c8a18e5508
2 changed files with 9 additions and 0 deletions

View File

@ -36,6 +36,7 @@ interface AccountsHotkeysProps {
selectBottom: () => void;
selectUpper: () => void;
activateHotkeys: (e: KeyboardEvent) => void;
setSelected: (value: string) => void;
}
const useAccountsHotkeys = ({
@ -44,6 +45,7 @@ const useAccountsHotkeys = ({
selectBottom,
selectUpper,
activateHotkeys,
setSelected,
}: AccountsHotkeysProps) => {
const [isEnabled, setIsEnabled] = useState(true);
@ -104,6 +106,9 @@ const useAccountsHotkeys = ({
},
hotkeysFilter,
);
// Deselect all accounts
useHotkeys("shift+n, ESC", () => setSelected("none"), hotkeysFilter);
};
export default useAccountsHotkeys;

View File

@ -55,6 +55,7 @@ const SectionBodyContent = (props) => {
activateHotkeys,
setHotkeyCaretStart,
setHotkeyCaret,
setSelected,
} = props;
const location = useLocation();
@ -66,6 +67,7 @@ const SectionBodyContent = (props) => {
selectBottom,
selectUpper,
activateHotkeys,
setSelected,
});
useEffect(() => {
@ -140,6 +142,7 @@ export default inject(({ peopleStore }) => {
setSelection: setPeopleSelection,
setBufferSelection: setPeopleBufferSelection,
selectUser,
setSelected,
} = peopleStore.selectionStore;
const {
@ -176,6 +179,7 @@ export default inject(({ peopleStore }) => {
setEnabledHotkeys,
setHotkeyCaretStart,
setHotkeyCaret,
setSelected,
};
})(
withTranslation(["People", "Common", "PeopleTranslations"])(