Skip to content

Conversation

@aarondoet
Copy link

📑 Description

Basically the same as themesberg/flowbite-svelte#1425. Instead of relying on some self made implementation for sorting and searching, which can be cumbersome if you have many tables with that functionality (on one page/in one component), it is now directly done by the Table itself.

Just like the PR for flowbite-svelte this basically replaces the TableSearch component, that got merged into the base Table component. Considering that this library has very low usage I'd just remove the TableSearch component instead of just deprecating it, but I'll let that up to you.

✅ Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

ℹ Additional Information

@vercel
Copy link

vercel bot commented Sep 3, 2024

@aarondoet is attempting to deploy a commit to the Shinichi Okada's projects Team on Vercel.

A member of the Team first needs to authorize it.

@aarondoet
Copy link
Author

I think I would prefer if the sorting would sort stable based on the previous sort state. Currently it sorts stable based on the initial item order. That would mean switching around sorting and filtering to now first sort. Feel free to let me know your opinion.

@aarondoet
Copy link
Author

Tailwind adds text-transform: none to buttons, th by default has the uppercase class. That makes it look weird if you have sortable columns and unsortable columns mixed. Tailwind also does not have classes for inherit properties (don't want to add the uppercase class because then you'd need to overwrite it twice when you don't want that). Should I add this to TableHeadCell?

button {
  text-transform: inherit;
}

Now sorts based on the previous sort state. Disadvantage: needs to sort all items, even if a filter is used to exclude some.
@vercel
Copy link

vercel bot commented Sep 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
svelte-5-ui-lib ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 4, 2024 3:54am

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant