Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.

Commit fb234ed

Browse files
authored
fix: fix filter tags component scss (#101)
1 parent 9c6ef90 commit fb234ed

6 files changed

Lines changed: 41 additions & 20 deletions

File tree

apps/gauzy/src/app/pages/invoices/invoices/by-role/invoices-by-role.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,12 @@ <h4>
184184
</ga-currency>
185185
</div>
186186
</div>
187-
<div class="col-sm-2">
187+
<div class="col-sm-3">
188188
<ga-tags-color-input
189189
[selectedTags]="searchForm.get('tags').value"
190190
(selectedTagsEvent)="selectedTagsEvent($event)"
191191
[isOrgLevel]="true"
192+
[useNoOfTagsFits]="false"
192193
>
193194
</ga-tags-color-input>
194195
</div>

apps/gauzy/src/app/pages/invoices/invoices/by-role/invoices-by-role.component.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ nb-tab {
382382
::ng-deep {
383383
@include card_overrides(auto, $default-card-height, $default-radius);
384384
@include ga-overrides.ng-select-overrides(
385-
ga-overrides.$default-height,
385+
ga-overrides.$default-height,
386386
$default-radius,
387387
ga-overrides.$default-box-shadow-inset
388388
);
@@ -402,7 +402,7 @@ nb-tab {
402402
}
403403

404404
:host nb-accordion {
405-
@include ga-overrides.dialog(var(--gauzy-card-1), var(--gauzy-card-1));
405+
@include ga-overrides.custom-dialog(auto, var(--gauzy-card-1), var(--gauzy-card-1));
406406
}
407407

408408
.comments-container {

packages/ui-core/shared/src/lib/tags/tags-color-input/tags-color-input.component.html

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,23 @@
2222
<ng-container *ngIf="multiple">
2323
<input type="checkbox" [ngModel]="tag$.selected" />
2424
</ng-container>
25-
<nb-badge
26-
[style.background]="background(tag.color)"
27-
class="tag-color"
28-
></nb-badge>
25+
<nb-badge [style.background]="background(tag.color)" class="tag-color"></nb-badge>
2926
<span class="text">{{ tag.name }}</span>
3027
</div>
3128
</ng-template>
3229
<ng-template ng-multi-label-tmp let-tags="selectedTags" let-clear="clear">
3330
<ng-container *ngIf="!!noOfTagsFits; else notOverflown">
34-
<div class="ng-value" *ngFor="
35-
let item of selectedTags
36-
| slice : 0 : noOfTagsFits || selectedTags.length
37-
">
38-
<nb-badge class="tag-color tag-label" [style.background]="background(item.color)"
39-
[style.color]="backgroundContrast(item.color)" [text]="item.name" (click)="clear(item)"></nb-badge>
31+
<div
32+
class="ng-value"
33+
*ngFor="let item of selectedTags | slice : 0 : noOfTagsFits || selectedTags.length"
34+
>
35+
<nb-badge
36+
class="tag-color tag-label"
37+
[style.background]="background(item.color)"
38+
[style.color]="backgroundContrast(item.color)"
39+
[text]="item.name"
40+
(click)="clear(item)"
41+
></nb-badge>
4042
</div>
4143
<div class="ng-value" *ngIf="selectedTags && selectedTags.length > noOfTagsFits">
4244
<span class="ng-value-label">...</span>
@@ -45,7 +47,8 @@
4547

4648
<ng-template #notOverflown>
4749
<div class="ng-value" *ngFor="let item of selectedTags">
48-
<nb-badge class="tag-color tag-label"
50+
<nb-badge
51+
class="tag-color tag-label"
4952
[style.background]="background(item.color)"
5053
[style.color]="backgroundContrast(item.color)"
5154
[text]="item.name"

packages/ui-core/shared/src/lib/tags/tags-color-input/tags-color-input.component.scss

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@ input {
2525
height: unset;
2626
}
2727
:host ::ng-deep {
28-
.ng-select.ng-select-multiple
29-
.ng-select-container
30-
.ng-value-container
31-
.ng-value {
28+
.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value {
3229
background-color: transparent;
3330
margin-right: 0;
3431
}

packages/ui-core/shared/src/lib/tags/tags-color-input/tags-color-input.component.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,17 @@ export class TagsColorInputComponent extends PictureNameTagsComponent implements
103103
this._addTag = value;
104104
}
105105

106+
/*
107+
* Getter & Setter fow flow with noOfTagsFits
108+
*/
109+
_useNoOfTagsFits = true;
110+
get useNoOfTagsFits(): boolean {
111+
return this._useNoOfTagsFits;
112+
}
113+
@Input() set useNoOfTagsFits(value: boolean) {
114+
this._useNoOfTagsFits = value;
115+
}
116+
106117
@Output() selectedTagsEvent = new EventEmitter<ITag[]>();
107118

108119
selectedTagsOverflow = false;
@@ -223,12 +234,14 @@ export class TagsColorInputComponent extends PictureNameTagsComponent implements
223234
}
224235
const selectedContainer = this.el.nativeElement.querySelector('.ng-value-container');
225236
const containerWidth = selectedContainer.offsetWidth;
226-
this.noOfTagsFits = 0;
237+
if (this.useNoOfTagsFits) this.noOfTagsFits = 0;
227238

228239
const totalTagWidth = selectedTags.reduce((acc, tag, currentIndex) => {
229240
const totalWidth = this.getTagWidth(tag.name) + acc;
230241

231-
if (totalWidth >= containerWidth && this.noOfTagsFits === 0) this.noOfTagsFits = currentIndex;
242+
if (this.useNoOfTagsFits && totalWidth >= containerWidth && this.noOfTagsFits === 0) {
243+
this.noOfTagsFits = currentIndex;
244+
}
232245

233246
return totalWidth;
234247
}, 30); // 30px is the additional buffer

packages/ui-core/static/styles/gauzy/_gauzy-overrides.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ $default-box-shadow: var(--gauzy-shadow);
4343
}
4444
}
4545

46+
@mixin custom-dialog($height, $card-background-color, $input-background-color) {
47+
@include input-appearance($height, $input-background-color);
48+
nb-card {
49+
background-color: $card-background-color;
50+
}
51+
}
52+
4653
@mixin input-appearance($height, $input-background-color) {
4754
::ng-deep input,
4855
::ng-deep nb-select.appearance-outline.status-basic .select-button,

0 commit comments

Comments
 (0)