Skip to content
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
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@if (_multiSelect) {
@if (_multiSelect()) {
<ids-pseudo-checkbox aria-hidden="true" [disabled]="_groupOrOptionIsDisabled()" [checkboxState]="_pseudoCheckboxState()" />
}

<div #text class="ids-option__text"><ng-content /></div>

@if (!_multiSelect && selected()) {
@if (!_multiSelect() && selected()) {
<ids-icon fontIcon="done" />
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class IdsOptionComponent<T = unknown>

protected _groupOrOptionIsDisabled = computed(() => this.group?.disabled() || this.disabledInput());

protected readonly _multiSelect = Boolean(this._parent?.multiSelect());
protected readonly _multiSelect = computed(() => Boolean(this._parent?.multiSelect()));

public selectionChange = output<IdsOptionSelectionChange<T>>();
public selectionUnchanged = output<IdsOptionSelectionChange<T>>();
Expand All @@ -75,7 +75,7 @@ export class IdsOptionComponent<T = unknown>
this.selected() ? 'selected' : null,
this._active() ? 'active' : null,
this._groupOrOptionIsDisabled() ? 'disabled' : null,
this._multiSelect ? 'multiselect' : null,
this._multiSelect() ? 'multiselect' : null,
this.size(),
this.variant(),
]));
Expand Down Expand Up @@ -178,7 +178,7 @@ export class IdsOptionComponent<T = unknown>
}

private _emitSelectionChangeEvent(selected: boolean, isUserInput = false): void {
if (this._multiSelect || !this.selected()) {
if (this._multiSelect() || !this.selected()) {
this.selectionChange.emit(new IdsOptionSelectionChange<T>(this, selected, isUserInput));
} else {
this.selectionUnchanged.emit(new IdsOptionSelectionChange<T>(this, selected, isUserInput));
Expand Down
Loading