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:
renovate[bot] 2022-09-10 17:44:25 +00:00 committed by GitHub
parent 7628ed975a
commit 237cb7b158
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 106 deletions

View file

@ -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]