-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
useRowState
seems to have a logical error
#2102
Comments
Hello @tannerlinsley, is this a verified bug? |
tannerlinsley
added
the
critical
Issues or bugs that are highly critical and must be solved as soon as possible.
label
Aug 3, 2020
ivaskevych
added a commit
to ivaskevych/react-table
that referenced
this issue
Sep 9, 2020
…initialCellStateAccessor` pass `row` / `cell` to `initialRowStateAccessor` / `initialCellStateAccessor` accordingly closes(TanStack#2102, TanStack#2701)
ivaskevych
added a commit
to ivaskevych/react-table
that referenced
this issue
Sep 9, 2020
…initialCellStateAccessor" pass "row" / "cell" to "initialRowStateAccessor" / "initialCellStateAccessor" accordingly closes(TanStack#2102, TanStack#2701)
tannerlinsley
pushed a commit
that referenced
this issue
Oct 4, 2020
…initialCellStateAccessor" (#2719) * fix(usepagination resetpage on globalfilter change): pageIndex reset autoReset pageIndex on globalFilter change "fix #1812" * fix(useRowState): change argument for `initialRowStateAccessor` and `initialCellStateAccessor` pass `row` / `cell` to `initialRowStateAccessor` / `initialCellStateAccessor` accordingly closes(#2102, #2701) * fix(useRowState): change argument for "initialRowStateAccessor" and "initialCellStateAccessor" pass "row" / "cell" to "initialRowStateAccessor" / "initialCellStateAccessor" accordingly closes(#2102, #2701)
🎉 This issue has been resolved in version 7.6.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since I am clearly just showing in your code exactly where the issue is, skipping the template there.
At the moment using the
useRowState
seems to have some bugs in theinitialAccessor
logic for both row and cell states.https://github.com/tannerlinsley/react-table/blob/master/src/plugin-hooks/useRowState.js#L156
Documentation says:
So while the type shows
originalRow
- the description indicates it would give the row or cell object (which is probably what it should be since its fairly useless for every sell to get the original row without knowing any information about itself even anyway. That should only be executed a single time if that is the case.Seems that both the row and cell should indeed receive the row or cell object as the docs indicate rather than the raw
originalRow
value being sent. At this point I can not see any purpose to using initialCellStateAccessorThe text was updated successfully, but these errors were encountered: