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
2 changes: 1 addition & 1 deletion projects/igniteui-angular/chips/src/chips/chip.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Component, ViewChild, ViewChildren, QueryList, ChangeDetectorRef, injec
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { IgxChipComponent } from './chip.component';
import { IgxChipsAreaComponent } from './chips-area.component';
import { IgxChipsAreaComponent } from './chips-area/chips-area.component';
import { IgxPrefixDirective } from '../../../input-group/src/public_api';
import { IgxLabelDirective } from '../../../input-group/src/public_api';
import { IgxSuffixDirective } from '../../../input-group/src/public_api';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@use 'themes/base';
@use 'themes/shared';
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Component, ContentChildren, ChangeDetectorRef, EventEmitter, HostBinding, Input, IterableDiffer, IterableDiffers, Output, QueryList, DoCheck, AfterViewInit, OnDestroy, ElementRef, inject } from '@angular/core';
import { Component, ContentChildren, ChangeDetectorRef, EventEmitter, HostBinding, Input, IterableDiffer, IterableDiffers, Output, QueryList, DoCheck, AfterViewInit, OnDestroy, ElementRef, inject, ViewEncapsulation } from '@angular/core';
import {
IgxChipComponent,
IChipSelectEventArgs,
IChipKeyDownEventArgs,
IChipEnterDragAreaEventArgs,
IBaseChipEventArgs
} from './chip.component';
} from '../chip.component';
import { IDropBaseEventArgs, IDragBaseEventArgs } from 'igniteui-angular/directives';
import { takeUntil } from 'rxjs/operators';
import { Subject } from 'rxjs';
Expand Down Expand Up @@ -48,7 +48,9 @@ export interface IChipsAreaSelectEventArgs extends IBaseChipsAreaEventArgs {
@Component({
selector: 'igx-chips-area',
templateUrl: 'chips-area.component.html',
standalone: true
styleUrl: 'chips-area.component.css',
encapsulation: ViewEncapsulation.None,
standalone: true,
})
export class IgxChipsAreaComponent implements DoCheck, AfterViewInit, OnDestroy {
public cdr = inject(ChangeDetectorRef);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component, ViewChild, ViewChildren, QueryList, ChangeDetectorRef, inject } from '@angular/core';
import { TestBed, waitForAsync } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { IgxChipComponent } from './chip.component';
import { IgxChipComponent } from '../chip.component';
import { IgxChipsAreaComponent } from './chips-area.component';
import { IgxIconComponent } from 'igniteui-angular/icon';
import { IgxPrefixDirective } from 'igniteui-angular/input-group';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@use 'styles/themes/standalone' as *;

@include layer(base) {
@include b(igx-chip-area) {
display: flex;
align-items: center;
justify-content: flex-start;
flex-wrap: wrap;
width: 100%;

&:empty {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why we need empty; the area is never empty, even when no chips are present. Can you test to see what happens if you remove it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the Grid context, the empty state is never reached because the drop-area element remains inside the chips-area even when no chips are added. However, when the chips-area is used independently outside of the grid, the empty state is applied whenever no chips are present. If we remove the 'empty' selector; on the empty state, the chips-area element will still be displayed, but with 0px height:

Screenshot 2026-04-20 at 18 10 13
Screenshot 2026-04-20 at 18 08 32

display: none;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@forward 'indigo';
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@use 'igniteui-theming/sass/typography' as *;
@use 'styles/themes/standalone' as *;

@include themed-block(igx-chip-area, indigo) {
padding: rem(4px);
gap: rem(8px)
}
4 changes: 2 additions & 2 deletions projects/igniteui-angular/chips/src/chips/public_api.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { IgxPrefixDirective, IgxSuffixDirective } from 'igniteui-angular/input-group';
import { IgxChipComponent } from './chip.component';
import { IgxChipsAreaComponent } from './chips-area.component';
import { IgxChipsAreaComponent } from './chips-area/chips-area.component';

export * from './chip.component';
export * from './chips-area.component';
export * from './chips-area/chips-area.component';

/* NOTE: Chips directives collection for ease-of-use import in standalone components scenario */
export const IGX_CHIPS_DIRECTIVES = [
Expand Down
12 changes: 0 additions & 12 deletions projects/igniteui-angular/chips/src/chips/themes/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,6 @@ $_theme: $material;
}
}

@include b(igx-chip-area) {
display: flex;
align-items: center;
justify-content: flex-start;
flex-wrap: wrap;
width: 100%;

&:empty {
display: none;
}
}

@include b(igx-chip) {
@include sizable();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,3 @@ $_theme: $indigo;
}
}
}

@include themed-block(igx-chip-area, indigo) {
padding: rem(4px);
gap: rem(8px)
}
10 changes: 3 additions & 7 deletions projects/igniteui-angular/grids/themes/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2061,9 +2061,9 @@ $z-grid-loading: 10003;
outline-style: none;
}

//%igx-chip {
// margin-block: pad-block(rem(4px), rem(8px), rem(8px));
//}
.igx-chip {
margin-block: pad-block(rem(4px), rem(8px), rem(8px));
}

@include e(connector) {
display: inline-flex;
Expand All @@ -2081,10 +2081,6 @@ $z-grid-loading: 10003;
transform: scaleX(-1);
}
}

.igx-chip-area {
flex-grow: 1;
}
}

@include b(igx-grid-th) {
Expand Down
5 changes: 5 additions & 0 deletions src/app/grid-auto-size/grid-auto-size.sample.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@
height: 100%;
align-items: start;
}

button {
margin-inline-end: 0.5rem;
margin-block-end: 0.5rem;
}