You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat(angular-table): Refactor Flex render implementation - Zoneless, Better type safety, allows reactive values into cell content, re-render when cell context changes, allow to pass signal inputs into custom components (#5856)
* feat: flex render granular updates
* updates
* cleanup
* cleanup
* cleanup
* fix test
* angular add explicit version of typescript
* Fix typescript versions
* add some testing for flex render in table
* fix test infra
* refactor flex render
* update lock
* fix tests, cleanup code
* fix tests, cleanup code
* flex render signal content support
* flex render signal content support
* improve view flags, handle state update in zoneless
* improve view flags, handle state update in zoneless
* fix
* ci: apply automated fixes
* clean docs
test
fix doc
add flexRenderComponent util
* test cases
* fix: enable computed rowModels
* fix test for rowModel
* assures that `updateProps` update inputs only for Component reference type
* Merge pull request #1 from riccardoperra/feat/angular-flex-render-support-output-binding
add support for angular outputs in flex-render-component
---------
Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* release: v8.21.0
* docs(angular): add editable, row-dnd and performant column resizing example (#5881)
* add editable cell example
* add editable cell example
* row dnd exmaple
* revert basic
* ci: apply automated fixes
* column resizing performant example
* fix
* fix budgets
* ci: apply automated fixes
* typo
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* docs(angular): add missing faker-js deps (#5883)
* fix(lit-table): dynamic data updates in the Lit Table Adapter (#5884)
* this fixes an issue I discussed in discord where with the lit table
adapter, updating a data array did not get reflected by the table.
It is a one-line change to the TableController, and a new example that
demonstrates the difference.
* Update packages/lit-table/src/index.ts
per suggestion from @kadoshms
Co-authored-by: Mor Kadosh <kadoshms@gmail.com>
---------
Co-authored-by: Luke Schierer <lschiere@amazon.com>
Co-authored-by: Mor Kadosh <kadoshms@gmail.com>
* docs: add experimental virtualization example (#5895)
* docs: add experimental virtualization example
* work on experimental virtualized column examples
---------
Co-authored-by: Kevin Van Cott <kevin.vancott@rentvision.com>
* release: v8.21.1
* docs: example name
* docs(angular): add expanding and sub components examples (#5898)
* docs(angular): add expanding example
* docs(angular): add sub components example
* docs(angular): fix config.json
* fix conflicts in lit package
* remove angular package non-fesm export
* since angular 19, ng-packgr only bundle a `fesm2022` export
* docs: exp virtual - remeasure when table state changes
* docs: virtualizer tbody from onchange
* update all angular examples
* fix conflicts in examples/react
* ci: apply automated fixes
* fix tests
* ci: apply automated fixes
* fix tests
* ci: apply automated fixes
* angular: update vite config to support vitest workspaces
* docs(angular): fix examples
* ci: apply automated fixes
---------
Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Tanner Linsley <tannerlinsley@users.noreply.github.com>
Co-authored-by: Luke Schierer <2224044+lschierer@users.noreply.github.com>
Co-authored-by: Luke Schierer <lschiere@amazon.com>
Co-authored-by: Mor Kadosh <kadoshms@gmail.com>
Co-authored-by: Kevin Van Cott <kevinvandy656@gmail.com>
Co-authored-by: Kevin Van Cott <kevin.vancott@rentvision.com>
@@ -40,41 +40,181 @@ FlexRender supports any type of content supported by Angular:
40
40
- A [TemplateRef](https://angular.dev/api/core/TemplateRef)
41
41
- A [Component](https://angular.dev/api/core/Component) wrapped into `FlexRenderComponent`
42
42
43
-
Example:
43
+
You can just use the `cell.renderValue` or `cell.getValue` APIs to render the cells of your table. However,
44
+
these APIs will only spit out the raw cell values (from accessor functions).
45
+
If you are using the `cell: () => any` column definition options, you will want to use the `FlexRenderDirective` from the adapter.
46
+
47
+
Cell column definition is **reactive** and runs into an **injection context**, then you can inject services or make use of signals to automatically modify the rendered content.
48
+
49
+
#### Example
44
50
45
51
```ts
46
52
@Component({
47
53
imports: [FlexRenderDirective],
48
54
//...
49
55
})
56
+
classYourComponent {}
50
57
```
51
58
52
59
```angular-html
53
60
54
61
<tbody>
55
62
@for (row of table.getRowModel().rows; track row.id) {
56
-
<tr>
57
-
@for (cell of row.getVisibleCells(); track cell.id) {
58
-
<td>
59
-
<ng-container
60
-
*flexRender="
63
+
<tr>
64
+
@for (cell of row.getVisibleCells(); track cell.id) {
65
+
<td>
66
+
<ng-container
67
+
*flexRender="
61
68
cell.column.columnDef.cell;
62
69
props: cell.getContext();
63
70
let cell
64
71
"
65
-
>
66
-
<!-- if you want to render a simple string -->
67
-
{{ cell }}
68
-
<!-- if you want to render an html string -->
69
-
<div [innerHTML]="cell"></div>
70
-
</ng-container>
71
-
</td>
72
-
}
73
-
</tr>
72
+
>
73
+
<!-- if you want to render a simple string -->
74
+
{{ cell }}
75
+
<!-- if you want to render an html string -->
76
+
<div [innerHTML]="cell"></div>
77
+
</ng-container>
78
+
</td>
79
+
}
80
+
</tr>
74
81
}
75
82
</tbody>
76
83
```
77
84
85
+
#### Rendering a Component
86
+
87
+
To render a Component into a specific column header/cell/footer, you can pass a `FlexRenderComponent` instantiated with
88
+
your `ComponentType, with the ability to include parameters such as inputs, outputs and a custom injector.
0 commit comments