You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With this you'll be able to filter out the values (and sort) on the table using the backend. Once the user changes the input of each column, the hx-trigger will bring the new table with the data filtered out.
To filter the items, you can have a text input right below the column header and the user may type there to filter the data. The user can use multiple text inputs (one in each column) and all of these will become a query string so HTMX can bring the result and update the entire table. Please, be careful with the Alpine state since the table will be updated. I mean, put the Alpine state above the table so it does not get changed.
The sort is basically click on the table column header and use that as the SortBy (inside Pagination DTO) and the first clicks inserts DESC to the SortDirection (also on Pagination DTO) and the next click sends ASC. That's pretty much it.
About the data picker, you'll have CreatedBeforeAt and CreatedAfterAt, so it's easy to ask the user for the dates necessary to filter the data. It can be a single component like a travel agency selector of sorts.
The text was updated successfully, but these errors were encountered:
When doing this, please adjust the Read operation to follow the new pagination/filter/sort (inside pagination) structure as seen on ScheduledTasks:
https://github.com/goinfinite/ez/blob/main/src/domain/dto/readScheduledTasks.go
With this you'll be able to filter out the values (and sort) on the table using the backend. Once the user changes the input of each column, the hx-trigger will bring the new table with the data filtered out.
To filter the items, you can have a text input right below the column header and the user may type there to filter the data. The user can use multiple text inputs (one in each column) and all of these will become a query string so HTMX can bring the result and update the entire table. Please, be careful with the Alpine state since the table will be updated. I mean, put the Alpine state above the table so it does not get changed.
The sort is basically click on the table column header and use that as the SortBy (inside Pagination DTO) and the first clicks inserts DESC to the SortDirection (also on Pagination DTO) and the next click sends ASC. That's pretty much it.
About the data picker, you'll have CreatedBeforeAt and CreatedAfterAt, so it's easy to ask the user for the dates necessary to filter the data. It can be a single component like a travel agency selector of sorts.
The text was updated successfully, but these errors were encountered: