Skip to content

Commit

Permalink
fix(addon-table): hydration error while configuring table
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Oct 8, 2024
1 parent e051888 commit c178654
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ import {TuiTableTh} from '../th/th.component';
templateUrl: './th-group.template.html',
changeDetection: ChangeDetectionStrategy.OnPush,
providers: [TUI_TABLE_PROVIDER],
host: {
/**
* TODO: fix later
* Be careful and thoughtful about using this attribute.
* It is intended as a last resort workaround.
* Components that break hydration should be
* considered bugs that need to be fixed.
*/
ngSkipHydration: 'true',
},
})
export class TuiTableThGroup<T extends Partial<Record<keyof T, any>>>
implements AfterContentInit
Expand Down
10 changes: 10 additions & 0 deletions projects/addon-table/components/table/tr/tr.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ import {TuiTableTd} from '../td/td.component';
templateUrl: './tr.template.html',
changeDetection: ChangeDetectionStrategy.OnPush,
providers: [TUI_TABLE_PROVIDER],
host: {
/**
* TODO: fix later
* Be careful and thoughtful about using this attribute.
* It is intended as a last resort workaround.
* Components that break hydration should be
* considered bugs that need to be fixed.
*/
ngSkipHydration: 'true',
},
})
export class TuiTableTr<T extends Partial<Record<keyof T, any>>>
implements AfterContentInit
Expand Down
7 changes: 7 additions & 0 deletions projects/core/components/expand/expand.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ export const TUI_EXPAND_LOADED = 'tui-expand-loaded';
changeDetection: ChangeDetectionStrategy.OnPush,
animations: [tuiParentAnimation],
host: {
/**
* TODO: fix later
* Be careful and thoughtful about using this attribute.
* It is intended as a last resort workaround.
* Components that break hydration should be
* considered bugs that need to be fixed.
*/
ngSkipHydration: 'true',
'[style.height.px]': 'height',
'[class._loading]': 'loading',
Expand Down

0 comments on commit c178654

Please sign in to comment.