Comments (8)
Try checked={true}
On Fri, Nov 4, 2016 at 10:47 AM Nikolai Hegelstad [email protected]
wrote:
const data = [{
name: 'Tanner Linsley',
age: 26,
friend: {
name: 'Jason Maurer',
age: 23
}
},{
name: 'Banner Dansley',
age: 19,
friend: {
name: 'Jason Mraz',
age: 30
}
}]const columns = [{
header: 'Name',
accessor: 'name' // String-based value accessors !
}, {
header: 'Age',
accessor: 'age',
render: // Custom cell components!
}, {
header: 'Friend Name',
accessor: 'friend.name' // Custom value accessors!
}, {
header: 'Friend Age',
//header: props => Friend Age, // Custom header components!
accessor: 'friend.age'
}]Result:
<----- should be rendered as—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#13, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AFUmCf0hqgamysGyzumf3dyNQQgob8-Wks5q62GzgaJpZM4KpwTg
.
from table.
Then to respond to changes, use onChange={() => {doSomething()}}
On Fri, Nov 4, 2016 at 11:23 AM Tanner Linsley [email protected]
wrote:
Try checked={true}
On Fri, Nov 4, 2016 at 10:47 AM Nikolai Hegelstad <
[email protected]> wrote:const data = [{
name: 'Tanner Linsley',
age: 26,
friend: {
name: 'Jason Maurer',
age: 23
}
},{
name: 'Banner Dansley',
age: 19,
friend: {
name: 'Jason Mraz',
age: 30
}
}]const columns = [{
header: 'Name',
accessor: 'name' // String-based value accessors !
}, {
header: 'Age',
accessor: 'age',
render: // Custom cell components!
}, {
header: 'Friend Name',
accessor: 'friend.name' // Custom value accessors!
}, {
header: 'Friend Age',
//header: props => Friend Age, // Custom header components!
accessor: 'friend.age'
}]Result:
<----- should be rendered as—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#13, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AFUmCf0hqgamysGyzumf3dyNQQgob8-Wks5q62GzgaJpZM4KpwTg
.
from table.
checked={true} doesn't change anything.
What am I supposed to put within:
onChange={(state, instance) => {
}}
from table.
That is the callback for when the page and sorting changes. It is an
opportunity for you to fetch server side data. Use it with the 'manual'
prop.
On Sun, Nov 6, 2016 at 9:29 AM Nikolai Hegelstad [email protected]
wrote:
checked={true} doesn't change anything.
What am I supposed to put within:
onChange={(state, instance) => {
}}
—
You are receiving this because you commented.Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFUmCYH8m2RaI3RdhiLhYnm4W4sWvzfJks5q7gCHgaJpZM4KpwTg
.
from table.
Aha, I don't think i need to fetch server side data. I just want to be able to check checkboxes within the custom cell component, the checking doesn't have to be persisted across page reloads or component lifecycles, but i would like to be able to access them from the application across paging.
Maybe it is wise to save the state of the checkbox within the data object? Do i change the state with onChange? And would you send me in the right direction to extract custom cell value changes?
from table.
Yes. In each row of the data, keep a property to track the check box state.
To track changes to the check box, just use an on change on the check box
and update that row.
React Table doesn't track state for anything except paging and sorting. The
rest is up to you. You can use your own components in the header and render
column properties, so you have full control.
On Sun, Nov 6, 2016 at 9:37 AM Nikolai Hegelstad [email protected]
wrote:
Aha, I don't think i need to fetch server side data. I just want to be
able to check checkboxes within the custom cell component, the checking
doesn't have to be persisted across page reloads or component lifecycles,
but i would like to be able to access them from the application across
paging.Maybe it is wise to save the state of the checkbox within the data object?
Do i change the state with onChange? And would you send me in the right
direction to extract custom cell value changes?—
You are receiving this because you commented.Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFUmCVGtif42aThEYxq-QcCztRQsU_1tks5q7gI4gaJpZM4KpwTg
.
from table.
Thanks for taking your time!
from table.
You bet!
On Sun, Nov 6, 2016 at 9:54 AM Nikolai Hegelstad [email protected]
wrote:
Thanks for taking your time!
—
You are receiving this because you commented.Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFUmCUTPsCS_6RWD-e8sAYGEOcxWZt9Jks5q7gYtgaJpZM4KpwTg
.
from table.
Related Issues (20)
- `autoResetPageIndex` seems to be default true when `manualPagination=true`, is not expectd as docs saying HOT 1
- Unexpected behavior of array filterFns (arrIncludes, arrIncludesAll, arrIncludesSome) HOT 1
- Table v8 expanding - incorrect state of parent checkbox when selecting subrows HOT 1
- `getTopRows()` and `getBottomRows()` Not Referentially Stable Between Renders
- Calling `row.getParentRow()` with expanded, filtered row models and initial filtering value throws an error HOT 1
- Table sorting is not working when drag and drop of columns is used HOT 1
- Custom sortingFn not being run when row key is undefined
- [Angular] In the example, column sorting does not work. HOT 2
- Global filter only works with string and number types
- To use @Tanstack Table/vue-table, you must import the core package, but the documentation does not specify this HOT 2
- Sub components are overlapped with successive rows HOT 1
- Bug Report: cell.isGrouped Always Returns false Despite enableGrouping Being true (REACT) HOT 2
- The left position of pinned columns in the sticky table is calculated incorrectly HOT 2
- cell only displays one line HOT 1
- When using virtual rendering and column drag-and-drop sorting simultaneously, they don't work well together HOT 2
- onPaginationChange when set to undefined doesn't fallback to using default pagination HOT 1
- Failed to monitor data changes, resulting in page turning without re-rendering. HOT 2
- Table using insane amount of memory even with virtualisation when scrolling HOT 2
- Issue with getIsSomeRowsSelected when using grouping
- [vue table] support for reactivity in Vue-adapter in version 8.20 broke reactive for the old getter `get data()` style HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from table.