Skip to content

Commit c8bbe6e

Browse files
committed
fix
1 parent c779d8e commit c8bbe6e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

goldens/material/chips/index.api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ export class MatChipEdit extends MatChipAction {
145145
// (undocumented)
146146
_handleKeydown(event: KeyboardEvent): void;
147147
// (undocumented)
148+
_isLeading: boolean;
149+
// (undocumented)
148150
_isPrimary: boolean;
149151
// (undocumented)
150152
static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipEdit, "[matChipEdit]", never, {}, {}, never, never, true, never>;
@@ -427,8 +429,6 @@ export class MatChipRemove extends MatChipAction {
427429
// (undocumented)
428430
_isPrimary: boolean;
429431
// (undocumented)
430-
_isTrailing: boolean;
431-
// (undocumented)
432432
static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipRemove, "[matChipRemove]", never, {}, {}, never, never, true, never>;
433433
// (undocumented)
434434
static ɵfac: i0.ɵɵFactoryDeclaration<MatChipRemove, never>;

src/material/chips/chip-action.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import {_StructuralStylesLoader} from '../core';
3030
'[class.mdc-evolution-chip__action--primary]': '_isPrimary',
3131
'[class.mdc-evolution-chip__action--presentational]': '!isInteractive',
3232
'[class.mdc-evolution-chip__action--secondary]': '!_isPrimary',
33-
'[class.mdc-evolution-chip__action--trailing]': '_isTrailing',
33+
'[class.mdc-evolution-chip__action--trailing]': '!_isPrimary && !_isLeading',
3434
'[attr.tabindex]': '_getTabindex()',
3535
'[attr.disabled]': '_getDisabledAttribute()',
3636
'[attr.aria-disabled]': 'disabled',
@@ -54,8 +54,8 @@ export class MatChipAction {
5454
/** Whether this is the primary action in the chip. */
5555
_isPrimary = true;
5656

57-
/** Whether this is the trailing action in the chip. */
58-
_isTrailing = false; // TODO(adolgachev): consolidate secondary and trailing css classes
57+
/** Whether this is the leading action in the chip. */
58+
_isLeading = false; // TODO(adolgachev): consolidate usage to secondary css class
5959

6060
/** Whether the action is disabled. */
6161
@Input({transform: booleanAttribute})

src/material/chips/chip-icons.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ export class MatChipTrailingIcon extends MatChipAction {
7373
})
7474
export class MatChipEdit extends MatChipAction {
7575
override _isPrimary = false;
76+
override _isLeading = true;
7677

7778
override _handleClick(event: MouseEvent): void {
7879
if (!this.disabled) {
@@ -120,7 +121,6 @@ export class MatChipEdit extends MatChipAction {
120121
})
121122
export class MatChipRemove extends MatChipAction {
122123
override _isPrimary = false;
123-
override _isTrailing = true;
124124

125125
override _handleClick(event: MouseEvent): void {
126126
if (!this.disabled) {

0 commit comments

Comments
 (0)