bigskysoftware / bigskysoftware/contact-app

active search when input is empty

Open
#23 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
130
Forks
59
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the active search section and the web controller handling GET requests to /contacts?q=. Trace what happens when q is empty, then compare the desired empty-search behavior with the existing pagination behavior. Done means clearing the input restores the normal paginated results instead of rendering all rows without pagination.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.