Skip to content
Open
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/MultiInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,10 @@ class MultiInput extends Input implements IFormInputElement {
this.style.setProperty("--_ui5-input-icons-count", `${this.iconsCount}`);
this.tokenizerAvailable = this.tokens && this.tokens.length > 0;

this.tokens.forEach((token, index) => {
(token as Token)._lastToken = index === this.tokens.length - 1;
});

if (this.tokenizer) {
this.tokenizer.readonly = this.readonly;
}
Expand Down
8 changes: 8 additions & 0 deletions packages/main/src/Token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,14 @@ class Token extends UI5Element implements IToken {
@property({ type: Boolean })
toBeDeleted = false;

/**
* Defines whether the token is the last one in the tokenizer
* @default false
* @private
*/
@property({ type: Boolean })
_lastToken = false;

/**
* Defines the tabIndex of the component.
* @private
Expand Down
4 changes: 4 additions & 0 deletions packages/main/src/themes/MultiInput.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,7 @@
--_ui5_input_tokenizer_min_width: 0px;
width: var(--_ui5_input_tokenizer_min_width);
}

::slotted([ui5-token][_last-token]) {
margin-inline-end: 0.375rem;
}
Loading