Skip to content

Commit

Permalink
chore: describe correct dependencies (#9174)
Browse files Browse the repository at this point in the history
When a component is using another components in its template, used components must be added to its dependencies in order to get the same scoping.
  • Loading branch information
nnaydenow authored Jun 11, 2024
1 parent 7f33c81 commit cd4f9b0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
9 changes: 7 additions & 2 deletions packages/main/src/Grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,11 @@ type GridRowClickEventDetail = {
styles: GridStyles,
template: GridTemplate,
fastNavigation: true,
dependencies: [BusyIndicator, GridCell],
dependencies: [
BusyIndicator,
GridCell,
GridRow,
],
})

/**
Expand Down Expand Up @@ -250,7 +254,7 @@ class Grid extends UI5Element {
* @default false
* @public
*/
@property({ type: Boolean, defaultValue: false })
@property({ type: Boolean })
loading!: boolean;

/**
Expand Down Expand Up @@ -300,6 +304,7 @@ class Grid extends UI5Element {
}

onBeforeRendering(): void {
this.style.setProperty(getScopedVarName("--ui5_grid_sticky_top"), this.stickyTop);
this._refreshPopinState();
}

Expand Down
7 changes: 0 additions & 7 deletions packages/main/src/GridHeaderRow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,6 @@ class GridHeaderRow extends GridRowBase {
@property({ type: Boolean })
sticky!: boolean;

onBeforeRendering() {
super.onBeforeRendering();
if (this._grid) {
this.style.top = this._grid.stickyTop;
}
}

isHeaderRow() {
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/main/src/themes/GridHeaderRow.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

:host([sticky]) {
position: sticky;
top: 0;
top: var(--ui5_grid_sticky_top, 0);
z-index: 1;
}

Expand Down

0 comments on commit cd4f9b0

Please sign in to comment.