mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-11 20:05:25 +00:00
Make language suggestions case insensitive (#124)
This commit is contained in:
parent
b9e6ce5690
commit
3dd4a16b7f
2 changed files with 8 additions and 1 deletions
|
|
@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Changed
|
||||
|
||||
- Made language suggestions case insensitive. ([#124](https://github.com/sourcebot-dev/sourcebot/pull/124))
|
||||
|
||||
## [2.6.1] - 2024-12-09
|
||||
|
||||
### Added
|
||||
|
|
|
|||
|
|
@ -113,6 +113,7 @@ const SearchSuggestionsBox = forwardRef(({
|
|||
isHighlightEnabled = false,
|
||||
isSpotlightEnabled = false,
|
||||
isClientSideSearchEnabled = true,
|
||||
isClientSideSearchCaseSensitive = true,
|
||||
descriptionPlacement = "left",
|
||||
onSuggestionClicked,
|
||||
DefaultIcon,
|
||||
|
|
@ -123,6 +124,7 @@ const SearchSuggestionsBox = forwardRef(({
|
|||
isHighlightEnabled?: boolean,
|
||||
isSpotlightEnabled?: boolean,
|
||||
isClientSideSearchEnabled?: boolean,
|
||||
isClientSideSearchCaseSensitive?: boolean,
|
||||
descriptionPlacement?: "left" | "right",
|
||||
onSuggestionClicked: (value: string) => void,
|
||||
DefaultIcon?: IconType
|
||||
|
|
@ -159,6 +161,7 @@ const SearchSuggestionsBox = forwardRef(({
|
|||
list: languageSuggestions,
|
||||
onSuggestionClicked: createOnSuggestionClickedHandler(),
|
||||
isSpotlightEnabled: true,
|
||||
isClientSideSearchCaseSensitive: false,
|
||||
}
|
||||
}
|
||||
case "refine":
|
||||
|
|
@ -205,7 +208,7 @@ const SearchSuggestionsBox = forwardRef(({
|
|||
const fuse = new Fuse(list, {
|
||||
threshold,
|
||||
keys: ['value'],
|
||||
isCaseSensitive: true,
|
||||
isCaseSensitive: isClientSideSearchCaseSensitive,
|
||||
});
|
||||
|
||||
const suggestions = (() => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue