-
Notifications
You must be signed in to change notification settings - Fork 1
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(selection): selecting dynamic generated options no longer renders… #182
Conversation
Please update the title of the comment header to be less than 100 characters and use the imperative tense. |
92546f1
to
27775b6
Compare
27775b6
to
191ca0a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit-picks in JSDocs, but otherwise approved.
@@ -216,27 +216,37 @@ export class AuroSelect extends LitElement { | |||
} | |||
|
|||
/** | |||
* Adds the value string to the trigger. | |||
* @param {string} str - The string to display in the trigger. | |||
* Updates the displayed value in an Auro dropdown component based on the provided option. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Updates the displayed value in an Auro dropdown component based on the provided option. | |
* Updates the displayed value of the select component based on the selected option. | |
* If option is a string, string value used in span element. If HTMLElement, the selected option is cloned and non-styling attributes are removed. |
* Adds the value string to the trigger. | ||
* @param {string} str - The string to display in the trigger. | ||
* Updates the displayed value in an Auro dropdown component based on the provided option. | ||
* @param {string|HTMLElement} option - The option to display. If a string, a new span element with the value string is created. If an HTMLElement, the selected option is cloned and non-styling attributes are removed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @param {string|HTMLElement} option - The option to display. If a string, a new span element with the value string is created. If an HTMLElement, the selected option is cloned and non-styling attributes are removed. | |
* @param {HTMLElement} option - The selected option element. |
191ca0a
to
cff574e
Compare
|
cff574e
to
8cd3ab9
Compare
8cd3ab9
to
7b40b37
Compare
## [2.10.1](v2.10.0...v2.10.1) (2024-05-13) ### Bug Fixes * **menu:** correctly handle dynamic menus [#182](#182) ([2cdf964](2cdf964))
🎉 This PR is included in version 2.10.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Alaska Airlines Pull Request
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Resolves: #178
Summary:
The previous code path inserted all auro-menuoption content as text into the trigger. This meant that when dynamically generating those options, and lit added an html content to the option body, the comment was also included as text in the trigger.
This change makes it so that we directly clone the option as HTML into the trigger so that the comment doesn't render. This change also adds a small amount of code to strip styles off the menuoption so it appears more like plain text per the design.
Type of change:
Please delete options that are not relevant.
Checklist:
By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Pull Requests will be evaluated by their quality of update and whether it is consistent with the goals and values of this project. Any submission is to be considered a conversation between the submitter and the maintainers of this project and may require changes to your submission.
Thank you for your submission!
-- Auro Design System Team