sforkowany z mirror/soapbox
AutosuggestInput/AutosuggestTextarea: short-circuit RTL check earlier
rodzic
8fde7f267d
commit
c788916644
|
@ -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';
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue