-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ui5-time-picker): display value state message in popover headers (#…
…10582) Previously, the `valueStateMessage` was displayed only below or above the input field, making it less clear when a `valueState` was active. With this enhancement, the `valueStateMessage` and its associated `valueState` styling now also appear in the header of the time selection popover, providing better visibility of the `valueState` and its provided message.
- Loading branch information
Showing
10 changed files
with
199 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js"; | ||
|
||
// Styles | ||
import Input from "./Input.js"; | ||
import { property } from "@ui5/webcomponents-base/dist/decorators.js"; | ||
|
||
/** | ||
* Extention of the UI5 Input, so we do not modify Input's private properties within the datetime components. | ||
* Intended to be used for the DateTime components. | ||
* | ||
* @class | ||
* @private | ||
*/ | ||
@customElement({ | ||
tag: "ui5-datetime-input", | ||
}) | ||
|
||
class DateTimeInput extends Input { | ||
@property({ noAttribute: true }) | ||
_shouldOpenValueStatePopover = false; | ||
|
||
/** | ||
* Prevents the value state message popover from appearing when a responsive popover (like time selection) is open | ||
* since the responsive popover already includes the necessary information in its header. | ||
* | ||
* @protected | ||
* @override | ||
*/ | ||
get hasValueStateMessage() { | ||
return this._shouldOpenValueStatePopover && super.hasValueStateMessage; | ||
} | ||
} | ||
|
||
DateTimeInput.define(); | ||
|
||
export default DateTimeInput; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.