Skip to content

Table: Export searchTerm #1560

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

Closed
superstes opened this issue Mar 20, 2025 · 4 comments · May be fixed by #1561
Closed

Table: Export searchTerm #1560

superstes opened this issue Mar 20, 2025 · 4 comments · May be fixed by #1561
Labels
enhancement New feature or request

Comments

@superstes
Copy link
Contributor

Summary

Users might want to set the searchTerm of a Table to some initial value (p.e. search parameter in URL).

This is currently not possible as that variable is not exported: https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/table/Table.svelte#L46

The TableSearch has exported it, but this component has not implemented the very useful items handling.

Motivation

The Table component is VERY well designed and useful 👍

This little adjustment could extend its usecases

@superstes superstes added the enhancement New feature or request label Mar 20, 2025
@superstes
Copy link
Contributor Author

Related to PR: #1425

@superstes
Copy link
Contributor Author

superstes commented Mar 20, 2025

BTW: @aarondoet Thank you for the sorting & search - you made my day 👍
Would've cost me lots of time to implement it myself..

@VsevolodGolovanov
Copy link

Will this allow binding my own input as the search input?

Both the <Table filter input and TableSearch are too opinionated and weird - forcing their own markup, TableSearch replacing the Table. Searching, filtering in general, sorting, pagination, row expansion etc - all common table features, so it's not clear why text searching warrants a separate Table-type component. I thought TableSearch would be just a search input that you could place anywhere and somehow bind to your Table. I wanted to put it in the TableHead.

Thanks for the cool library! 👍

@shinokada
Copy link
Collaborator

Please use v1.x.x and this example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants