AutosuggestInput/AutosuggestTextarea: short-circuit RTL check earlier
This commit is contained in:
parent
8fde7f267d
commit
c788916644
2 changed files with 2 additions and 2 deletions
|
@ -269,7 +269,7 @@ export default class AutosuggestInput extends ImmutablePureComponent<IAutosugges
|
|||
const visible = !suggestionsHidden && (!suggestions.isEmpty() || (menu && value));
|
||||
|
||||
// TODO: convert to functional component and use `useLocale()` hook instead of checking placeholder text.
|
||||
if (isRtl(value) || (placeholder && isRtl(placeholder) && !value)) {
|
||||
if (isRtl(value) || (!value && placeholder && isRtl(placeholder))) {
|
||||
style.direction = 'rtl';
|
||||
}
|
||||
|
||||
|
|
|
@ -230,7 +230,7 @@ class AutosuggestTextarea extends ImmutablePureComponent<IAutosuggesteTextarea>
|
|||
const style = { direction: 'ltr', minRows: 10 };
|
||||
|
||||
// TODO: convert to functional component and use `useLocale()` hook instead of checking placeholder text.
|
||||
if (isRtl(value) || (placeholder && isRtl(placeholder) && !value)) {
|
||||
if (isRtl(value) || (!value && placeholder && isRtl(placeholder))) {
|
||||
style.direction = 'rtl';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue