[MM-64893] Account for extra whitespace when replacing date on search hint (#33563) (#33590)

* [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 9d6fc51ef35c242817a52b6206610abc5fc55503.

* Remove delayInputUpdate

(cherry picked from commit c775615868393566d6cf6caa0820869890da97a2)

Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
Этот коммит содержится в:
Mattermost Build
2025-07-30 16:28:11 +03:00
коммит произвёл GitHub
родитель 6cbcf4e290
Коммит 04d2ca2e3e
2 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

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