mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-24 20:14:35 -04:00
Update dependency react-bootstrap-typeahead to v6 (#2356)
* Update dependency react-bootstrap-typeahead to v6 Signed-off-by: Renovate Bot <bot@renovateapp.com> * Fixed used typeahead types Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de> Signed-off-by: Renovate Bot <bot@renovateapp.com> Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
7628ed975a
commit
237cb7b158
3 changed files with 33 additions and 106 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
||||
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
@ -9,6 +9,7 @@ import { useApplicationState } from '../../../hooks/common/use-application-state
|
|||
import { useTranslation } from 'react-i18next'
|
||||
import { Typeahead } from 'react-bootstrap-typeahead'
|
||||
import { useHistoryToolbarState } from './toolbar-context/use-history-toolbar-state'
|
||||
import type { Option } from 'react-bootstrap-typeahead/types/types'
|
||||
|
||||
/**
|
||||
* Renders an input field that filters history entries by selected tags.
|
||||
|
@ -28,10 +29,10 @@ export const TagSelectionInput: React.FC = () => {
|
|||
}, [historyEntries])
|
||||
|
||||
const onChange = useCallback(
|
||||
(selectedTags: string[]) => {
|
||||
(selectedTags: Option[]) => {
|
||||
setHistoryToolbarState((state) => ({
|
||||
...state,
|
||||
selectedTags
|
||||
selectedTags: selectedTags as string[]
|
||||
}))
|
||||
},
|
||||
[setHistoryToolbarState]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue