React Table Tutorial - 7 - Sorting and Formatting

React Table Tutorial - 7 - Sorting and Formatting

Codevolution

3 года назад

44,930 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@kemcadams7210
@kemcadams7210 - 30.01.2023 03:40

so the date format is not correct with the current version of react-table - throws error on format

Ответить
@mdfaisalrazakhan8810
@mdfaisalrazakhan8810 - 20.01.2023 13:04

I am not getting how to do it with data coming from API.

Ответить
@nickcoleman
@nickcoleman - 20.12.2022 17:50

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

Ответить
@ashutoshchandra3337
@ashutoshchandra3337 - 16.10.2022 14:13

what is the import package for Cell ?

Ответить
@longnhat6405
@longnhat6405 - 16.10.2022 10:14

thank very much

Ответить
@Pareshbpatel
@Pareshbpatel - 28.09.2022 17:30

{2021-12-28}, {2022-09-28}

Ответить
@johnfoster5429
@johnfoster5429 - 17.05.2022 14:38

Great tutorials, this ones nice and to the point!

Ответить
@nagendraganni8107
@nagendraganni8107 - 15.03.2022 08:56

Hello, how to get those icons ?

Ответить
@fola2829
@fola2829 - 28.10.2021 08:16

I need date range filtering with this react table

Ответить
@davebo1476
@davebo1476 - 21.09.2021 16:38

after implementing the date format it is not possible to search with the globalFilter correctly anymore

Ответить
@zhangkate6454
@zhangkate6454 - 22.05.2021 01:19

the tutor is really good at making examples and instructs it. Thanks for your work!!!

Ответить
@devdive24
@devdive24 - 21.05.2021 04:56

How can I disable sorting for a specific column?

Ответить
@nuancetone
@nuancetone - 19.05.2021 22:17

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?

Ответить
@antonin2478
@antonin2478 - 18.03.2021 15:24

Can you please tell me what other arguments does Cell function receives?

Ответить
@ezeargen
@ezeargen - 11.03.2021 00:37

If have problem with sorting Date

Ответить
@prabhatmishra6856
@prabhatmishra6856 - 29.11.2020 08:44

any idea how to clear all filters on event onClick

Ответить
@shalu1433
@shalu1433 - 20.10.2020 16:11

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 .

Ответить
@papagachango
@papagachango - 20.10.2020 15:14

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.

Ответить
@umerfarooq3121
@umerfarooq3121 - 20.10.2020 12:54

Please also do pagination like we only want to show 10 records per page.
Thank you.

Ответить
@jayakumar-pv3jf
@jayakumar-pv3jf - 19.10.2020 17:42

How to report udemy?
Theft your content vishwas!

Ответить
@khandoor7228
@khandoor7228 - 19.10.2020 16:28

Again excellent content, are you going to do pagination as well?

Ответить