Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui5-combobox, ui5-textarea): Value state message correctly positioned in RTL mode #4396

Merged
merged 1 commit into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/main/src/ComboBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,10 @@ class ComboBox extends UI5Element {
return !this.valueStateMessage.length && this.hasValueStateText;
}

get _valueStatePopoverHorizontalAlign() {
return this.effectiveDir !== "rtl" ? "Left" : "Right";
}

/**
* This method is relevant for sap_horizon theme only
*/
Expand Down
1 change: 1 addition & 0 deletions packages/main/src/ComboBoxPopover.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
no-padding
hide-arrow
class="ui5-valuestatemessage-popover"
horizontal-align="{{_valueStatePopoverHorizontalAlign}}"
placement-type="Bottom"
>
<div slot="header" class="{{classes.popoverValueState}}" style="{{styles.popoverHeader}}">
Expand Down
4 changes: 4 additions & 0 deletions packages/main/src/TextArea.js
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,10 @@ class TextArea extends UI5Element {
return this.valueStateTextMappings()[this.valueState];
}

get _valueStatePopoverHorizontalAlign() {
return this.effectiveDir !== "rtl" ? "Left" : "Right";
}

/**
* This method is relevant for sap_horizon theme only
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/main/src/TextAreaPopover.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class="ui5-valuestatemessage-popover"
style="{{styles.valueStateMsgPopover}}"
placement-type="Bottom"
horizontal-align="Left"
horizontal-align="{{_valueStatePopoverHorizontalAlign}}"
>
<div slot="header" class="ui5-valuestatemessage-root {{classes.valueStateMsg}}">
<ui5-icon class="ui5-input-value-state-message-icon" name="{{_valueStateMessageIcon}}"></ui5-icon>
Expand Down