-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(NovoDataTable): updating data table logic and template to better facilitate custom filters (#1382) * fix(NovoButton): disabling enter/space keypresses on disabled/loading buttons (#1375) * fix(NovoSelect): Fix issue with hints not displaying within Novo Select controls (#1374) fix(NovoSelect): Fix issue with hints not displaying within Novo Select controls. Co-authored-by: Kevin Cable <[email protected]> * chore(deps): addressing multiple high level security alerts (#1376) * fix(): addressing multiple high level security updates * adding back and updating htmlhint dep * feat(NovoDataTable): updating data table logic and template to better facilitate custom filters * fix(NovoDataTable): fixing scrollbar issue * fixing typing issue * stricter typing on filter header label Co-authored-by: Vonterio Duncan <[email protected]> Co-authored-by: Kevin Cable <[email protected]> * fix(quickNote): Allow placeholder to hide when clicking in text field to write a note (#1386) Allow placeholder to hide when clicking in text field to write a note --------- Co-authored-by: Vonterio Duncan <[email protected]> Co-authored-by: Kevin Cable <[email protected]> Co-authored-by: EthanMcM <[email protected]>
- Loading branch information
1 parent
b77d596
commit e2ef564
Showing
9 changed files
with
151 additions
and
107 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
...ts/src/elements/data-table/cell-headers/data-table-header-cell-filter-header.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, Output } from '@angular/core'; | ||
import { NovoLabelService } from '../../../services/novo-label-service'; | ||
import { Helpers } from '../../../utils'; | ||
|
||
@Component({ | ||
selector: 'novo-data-table-cell-filter-header', | ||
template: ` | ||
<div class="header"> | ||
<novo-label>{{ label || labels.filters }}</novo-label> | ||
<novo-button | ||
theme="dialogue" | ||
color="negative" | ||
size="small" | ||
icon="times" | ||
(click)="clearFilter.emit()" | ||
*ngIf="hasFilter" | ||
data-automation-id="novo-data-table-filter-clear"> | ||
{{ labels.clear }} | ||
</novo-button> | ||
</div> | ||
`, | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class NovoDataTableCellFilterHeader { | ||
@Input() label: string | number; | ||
|
||
@Input() | ||
set filter(filter: any) { | ||
this._filter = filter; | ||
this.hasFilter = !Helpers.isEmpty(filter); | ||
} | ||
get filter(): any { | ||
return this._filter; | ||
} | ||
private _filter: any; | ||
|
||
public hasFilter = false; | ||
|
||
@Output() clearFilter: EventEmitter<void> = new EventEmitter<void>(); | ||
|
||
constructor(public changeDetectorRef: ChangeDetectorRef, public labels: NovoLabelService) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters