fix(ui5-tokenizer, ui5-multi-input,ui5-multi-combobox): Improve stylisation#13314
Open
fix(ui5-tokenizer, ui5-multi-input,ui5-multi-combobox): Improve stylisation#13314
Conversation
Collaborator
|
🚀 Deployed on https://pr-13314--ui5-webcomponents-preview.netlify.app |
Vonahz
reviewed
Mar 24, 2026
| this.tokenizer.readonly = this.readonly; | ||
|
|
||
| // Set the CSS variable on the tokenizer element so it's available in the shadow DOM | ||
| this.tokenizer.style.setProperty("--_ui5-input-icons-count", `${this.iconsCount}`); |
Contributor
There was a problem hiding this comment.
I think this is not used as only tokens are rendered.
Vonahz
reviewed
Mar 24, 2026
| } | ||
|
|
||
| if (newMarkedToken) { | ||
| newMarkedToken.setAttribute("last-visible-token", ""); |
Contributor
There was a problem hiding this comment.
Why we not just make private property in the token as "lastVisibleToken" and then manipulate it here, this is how the framework will attach itself last-visible-token as attribute in its natural reactive way in the template. Something like:
const tokensArray = this._tokens;
const hasOverflow = this._nMoreCount > 0;
const shouldMark = !this.expanded && hasOverflow;
tokensArray.forEach((token, index) => {
const isVisible = !token.overflows;
const visibleTokens = tokensArray.filter(t => !t.overflows);
const isLastVisible = isVisible && token === visibleTokens[visibleTokens.length - 1];
token.lastVisibleToken = shouldMark && isLastVisible;
});
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JIRA: BGSOFUIRILA-3333
FIXES: #5096
FIXES: #13184