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

This commit is contained in:
Alex Gleason 2022-12-23 11:17:06 -06:00
parent 058a75deec
commit 140c0b3037
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
2 changed files with 4 additions and 2 deletions

View file

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

View file

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