Комментарии:
so the date format is not correct with the current version of react-table - throws error on format
ОтветитьI am not getting how to do it with data coming from API.
ОтветитьSuggestion: use Cell property for formatting and data manipulation (NOT accessor).
{
Header: 'First Name',
Cell: ({ cell: { value }}) => <div style={{ fontWeight: 'bold' }}>{value}</div>,
accessor: 'first_name',
},
{
Header: 'Fullname',
accessor: 'last_name',
Cell: props => {
const { last_name, first_name } = props.row.original
return <div>{first_name} {last_name</div>
}
},
If you format the accessor property, then in most instances filtering (and other features) won't work as expected.
Cell is also useful if you need info from other parts of the table (console.log(props) to see what you can pull -- it's quite extensive). The 2nd example shows combining multiple columns.
accessor is still required
what is the import package for Cell ?
Ответитьthank very much
Ответить{2021-12-28}, {2022-09-28}
ОтветитьGreat tutorials, this ones nice and to the point!
ОтветитьHello, how to get those icons ?
ОтветитьI need date range filtering with this react table
Ответитьafter implementing the date format it is not possible to search with the globalFilter correctly anymore
Ответитьthe tutor is really good at making examples and instructs it. Thanks for your work!!!
ОтветитьHow can I disable sorting for a specific column?
ОтветитьViswas, first, thanks for the great content. Always very clear and concise. Have a question about formatting rows. I've built a table using this tutorial and would like to add an action column wth a button for details or edit or delete. I followed the same workflow for the date format, using the value prop to grab the data there. But in this new column, there wouldn't be data for this prop and I'll need the ID of the element to go to another page for details or something else. Is there a way that's preferred for this?
ОтветитьCan you please tell me what other arguments does Cell function receives?
ОтветитьIf have problem with sorting Date
Ответитьany idea how to clear all filters on event onClick
Ответитьhello dear, I want to create a react table which some of the data are inserted by the user which means editable row data, i want the table data at first empty. Thank you for this amazing videos in react table .
Ответитьgreat guide.On your next tutorial for react-table filtering, please show how to do server side filtering through api. consider data loaded is paged.
ОтветитьPlease also do pagination like we only want to show 10 records per page.
Thank you.
How to report udemy?
Theft your content vishwas!
Again excellent content, are you going to do pagination as well?
Ответить