mirror of
https://github.com/mattermost/mattermost.git
synced 2026-09-24 16:05:00 +08:00
[MM-64893] Account for extra whitespace when replacing date on search hint (#33563)
* [MM-64893] Account for extra whitespace when replacing date on search hint
* Fix ordering of caret position and selection range
* Revert "Fix ordering of caret position and selection range"
This reverts commit 9d6fc51ef3.
* Remove delayInputUpdate
This commit is contained in:
@@ -175,7 +175,7 @@ const SearchBox = forwardRef(
|
||||
}
|
||||
|
||||
setSearchTerms(
|
||||
searchTerms.slice(0, caretPosition).replace(new RegExp(escapedMatchedPretext + '$', 'i'), '').trimEnd() +
|
||||
searchTerms.slice(0, caretPosition).trimEnd().replace(new RegExp(escapedMatchedPretext + '$', 'i'), '').trimEnd() +
|
||||
val +
|
||||
extraSpace +
|
||||
searchTerms.slice(caretPosition),
|
||||
|
||||
@@ -111,7 +111,6 @@ const SearchInput = forwardRef<HTMLInputElement, Props>(({searchTerms, searchTyp
|
||||
value={searchTerms}
|
||||
onChange={inputChangeCallback}
|
||||
type='search'
|
||||
delayInputUpdate={true}
|
||||
clearable={true}
|
||||
autoFocus={true}
|
||||
onKeyDown={onKeyDown}
|
||||
|
||||
Reference in New Issue
Block a user