How To Sort A Table In React (No Libraries)

How To Sort A Table In React (No Libraries)

Jacob Broughton

1 год назад

3,860 Просмотров

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


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

@JacoblBroughton
@JacoblBroughton - 02.02.2023 17:50

Hey everyone, what would you guys like a video on next?

Ответить
@RachelJohnson-sq3ci
@RachelJohnson-sq3ci - 05.09.2023 22:32

Hi Jacob! Thanks for this. Any chance you could share the code?

Ответить
@timgoens7617
@timgoens7617 - 27.06.2023 18:16

Okay, so this is a great video, short and sweet. However, it's still not working for me :(

Here's my problem - the site I'm working on right now is basically nothing but tables. Like, 8/9 links on the navbar go to a page with tables. Some pages have multiple tables separated by tabs! So because of this, I needed a custom table component that I can just slap everywhere and the data and headers are dynamic based on the needs of each page. I put it together a few months back and was like, I'll add sorting later! It's got so much going on including dynamic styling based on the type of data I'm passing in.

Since it's not a simple table like you have made I'm worried that part of the problem? Yours is the only success I've had, but it's still not correct. Basically, it takes two clicks on the header and what ends up happening is that it just reverses the order, but doesn't sort them.

I don't know if you can help me at all, but I'd really appreciate any advice you can give me!

Ответить
@jewelthomas668
@jewelthomas668 - 22.04.2023 22:37

Hello Jacob, really liked the way you explained things keeping the video precise. This video was all that i needed rn. Thank you😃

Ответить
@Dysfunctional704
@Dysfunctional704 - 03.02.2023 02:56

Nice vid Jacob! Can you try building a list, making its rows draggable? Something like React SortableJS

Ответить