Skip to content
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

Allow sort symbol to be clickable in table component #377

Open
sodapopcan opened this issue Nov 12, 2024 · 5 comments
Open

Allow sort symbol to be clickable in table component #377

sodapopcan opened this issue Nov 12, 2024 · 5 comments

Comments

@sodapopcan
Copy link

Hiya @woylie,

Would you be open to including an option to allow the sort symbol to be clickable as well. Perhaps the whole header even? Our design system shows a symbol when a field is sortable but unsorted and it really makes people want to click it. I'm happy to do the work.

Thanks for the awesome lib!

Andrew

@woylie
Copy link
Owner

woylie commented Nov 13, 2024

Hi @sodapopcan,

I don't think I want to add another option to the component for this. It might make more sense to just move the symbol inside the link by default. Might require updating the styles in some applications, though.

@sodapopcan
Copy link
Author

The fewer options the better, absolutely. The fact that this could (and probably will) mess with some peoples' styles is why I proposed it as an option. Perhaps it could be temporary with a deprecation across minor versions? That still adds a documentation burden, of course.

If this is a no-go I can actually easily hack around it with some JS.

@woylie
Copy link
Owner

woylie commented Nov 13, 2024

I don't like adding temporary option for this. I think we can probably make the change with the next minor version, as long as we add a clear note in the changelog.

@sodapopcan
Copy link
Author

Yep, I'm just full of bad ideas (temporary option) 😅

Ok, thank you so much, this is a big help!

@kuatroka
Copy link

kuatroka commented Dec 5, 2024

I think it's a good idea. It could be quite annoying to realise that the icon to sort , does not really sort... so +1 for this one. The implementation is a different thing though. If there is a clear way to deal with it within the confines of Tailwind, it could just be added to some sort of a guide or FAQ and not need to change the code at all. Thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants