Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 88a962f

Browse filesBrowse files
committed
fix(table-color): allow undefined type for color input prop
1 parent d9cc821 commit 88a962f
Copy full SHA for 88a962f

File tree

1 file changed

+3
-2
lines changed
Filter options

1 file changed

+3
-2
lines changed

‎projects/coreui-angular/src/lib/table/table-color.directive.ts

Copy file name to clipboardExpand all lines: projects/coreui-angular/src/lib/table/table-color.directive.ts
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ export class TableColorDirective {
1313
* Use contextual color for tables, table rows or individual cells.
1414
* @return Colors
1515
*/
16-
readonly color = input<Colors>(undefined, { alias: 'cTableColor' });
16+
readonly color = input<Colors | undefined>(undefined, { alias: 'cTableColor' });
1717

1818
readonly hostClasses = computed(() => {
19+
const color = this.color();
1920
return {
20-
[`table-${this.color()}`]: !!this.color()
21+
[`table-${color}`]: !!color
2122
} as Record<string, boolean>;
2223
});
2324
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.