Skip to content

active search when input is empty #23

@kaung-minkhant

Description

@kaung-minkhant

Hi, I am new to HTMX and learning it using the book. In active search section, everything works as expected, except for one detail. Say, I have a keyword in search input and then I clear it. Keyup event is triggered and a get request to '/contacts?q=' is made, because the field is empty. Now, in the web controller, we are saying 'if search is not None', now, the q is certainly not None. So all the rows are rendered. Now, from user perspective, when the search is empty, he would want the normal behavior, with all the pagination. How would I achieve it?

Also, I am also searching for something like discord to communicate, I have only the invalid invite link, so if there is one, please kindly let me know. Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions