Skip to content

Commit

Permalink
Updated documentation for advanced fixed areas
Browse files Browse the repository at this point in the history
  • Loading branch information
bennyboer committed Aug 3, 2022
1 parent c60a79b commit e3e0703
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@angular/router": "^14.1.0",
"ngx-highlightjs": "^7.0.0",
"rxjs": "~7.5.0",
"table-engine": "^0.1.7",
"table-engine": "^0.2.1",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<h1>Fixed rows/columns</h1>

<p>
The Table Engine currently supports fixing rows and columns to the left and top.
The Table Engine currently supports fixing rows and columns to the left, top, right and bottom.
Fixed rows or columns will always be visible, no matter where the user is scrolling in the table.
You can enabled fixed rows or columns by setting <code>engine.getOptions().renderer.view.fixedRows</code> and/or <code>engine.getOptions().renderer.view.fixedColumns</code> to a non-negative number.
In the below example two rows and one column are fixed and stay visible all the time when scrolling.
You can enabled fixed rows or columns by configuring <code>engine.getOptions().renderer.view.fixedAreas</code> to your liking.
In the below example two rows are fixed to the top and one to the bottom, one column to the left and right and stay visible all the time when scrolling.
</p>

<iframe src='https://stackblitz.com/edit/typescript-rjzhop?embed=1&file=index.ts&hideExplorer=1&hideNavigation=1&theme=light&view=preview'></iframe>
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,12 @@ render(
cellModel
);

engine.getOptions().renderer.view.fixedRows = 1;
engine.getOptions().renderer.view.fixedColumns = 1;
engine.getOptions().renderer.view.fixedAreas = {
left: 1,
top: 1,
bottom: 0,
right: 0,
};

engine.getOptions().selection.selectionTransform =
ROW_COLUMN_HEADER_TRANSFORM;
Expand Down
8 changes: 6 additions & 2 deletions docs/app/src/app/guide/introduction/introduction.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,12 @@ export class IntroductionComponent implements AfterViewInit {
cellModel
);

engine.getOptions().renderer.view.fixedRows = 1;
engine.getOptions().renderer.view.fixedColumns = 1;
engine.getOptions().renderer.view.fixedAreas = {
left: 1,
top: 1,
right: 0,
bottom: 0,
};

engine.getOptions().selection.selectionTransform =
ROW_COLUMN_HEADER_TRANSFORM;
Expand Down
8 changes: 4 additions & 4 deletions docs/app/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5488,10 +5488,10 @@ [email protected]:
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-4.0.0.tgz#5b425f192279e87f2f9b937ac8540d1984b39205"
integrity sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ==

table-engine@^0.1.7:
version "0.1.7"
resolved "https://registry.yarnpkg.com/table-engine/-/table-engine-0.1.7.tgz#4c26dc4779648b36b2334e969b831a0100c2f095"
integrity sha512-S8yYXpq+Gd5cSqkKALZ8Lt7JngKA4GCzrSluyjDng0DE0lcahN1bkneVhTkNMdHmhziWHMd9yWIyu/xhDWGJ3A==
table-engine@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/table-engine/-/table-engine-0.2.1.tgz#bf1ebd89279a72a8b2fba3d3891ab10069904512"
integrity sha512-4TJLRdRBLduXND0AlvN5cpPwhkpxwYinCcDmH3lSPJUUBkhYG99m3vK+GOnubGBVbko2HmXuFwHmtdJIPoTW4w==
dependencies:
rxjs "^7.4.0"

Expand Down

0 comments on commit e3e0703

Please sign in to comment.