Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix dynamic data updates in the Lit Table Adapter #5884

Merged
merged 2 commits into from
Jan 27, 2025

Conversation

lschierer
Copy link
Contributor

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.

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.
@KevinVandy
Copy link
Member

@kadoshms We've had problems in the Lit adapter with data not being reactive. This fixes it. Wonder if we need to make more/all table options reactive? Maybe at least columns too?

@lschierer
Copy link
Contributor Author

I'm fairly sure making the columns reactive is a similar one line fix, but I didn't test that. I didn't need it.

@lschierer
Copy link
Contributor Author

and many thanks to @KevinVandy for walking me through this.

@kadoshms
Copy link
Contributor

kadoshms commented Jan 26, 2025

LGTM

As suggested - this is true for columns as well, good catch 👍

per suggestion from @kadoshms

Co-authored-by: Mor Kadosh <kadoshms@gmail.com>
@KevinVandy KevinVandy merged commit 9763877 into TanStack:main Jan 27, 2025
@lschierer lschierer deleted the feat-lit-dynamic-data branch January 27, 2025 19:13
KevinVandy added a commit that referenced this pull request Feb 10, 2025
* 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>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants