AutosuggestInput/AutosuggestTextarea: determine RTL by placeholder value as well (hotfix)

tajwal
Alex Gleason 2022-12-23 11:17:06 -06:00
rodzic 058a75deec
commit 140c0b3037
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
2 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -268,7 +268,8 @@ export default class AutosuggestInput extends ImmutablePureComponent<IAutosugges
const visible = !suggestionsHidden && (!suggestions.isEmpty() || (menu && value));
if (isRtl(value)) {
// TODO: convert to functional component and use `useLocale()` hook instead of checking placeholder text.
if (isRtl(value) || (placeholder && isRtl(placeholder))) {
style.direction = 'rtl';
}

Wyświetl plik

@ -229,7 +229,8 @@ class AutosuggestTextarea extends ImmutablePureComponent<IAutosuggesteTextarea>
const { suggestionsHidden } = this.state;
const style = { direction: 'ltr', minRows: 10 };
if (isRtl(value)) {
// TODO: convert to functional component and use `useLocale()` hook instead of checking placeholder text.
if (isRtl(value) || (placeholder && isRtl(placeholder))) {
style.direction = 'rtl';
}