Skip to content

OBLS-744 Require minimum 3 chars before triggering product/location l…#403

Merged
awalkowiak merged 1 commit into
developfrom
OBLS-744
May 20, 2026
Merged

OBLS-744 Require minimum 3 chars before triggering product/location l…#403
awalkowiak merged 1 commit into
developfrom
OBLS-744

Conversation

@olewandowski1
Copy link
Copy Markdown
Collaborator

…ookups

https://openboxes.atlassian.net/browse/OBLS-744

The product/location typeahead in SearchButton currently fires a lookup on every keystroke, which fetches the full unpaginated dataset (~13k products / ~5k locations on VVG). This PR gates the lookup behind a MIN_SEARCH_LENGTH threshold and surfaces a clear hint to the user while below it.

image image image

@olewandowski1 olewandowski1 requested a review from awalkowiak May 18, 2026 09:20
@olewandowski1
Copy link
Copy Markdown
Collaborator Author

Related PR: openboxes/openboxes#5921

Comment thread src/constants.ts
export const appConfig = {
DEFAULT_DEBOUNCE_TIME: 100,
DEFAULT_SEARCH_DEBOUNCE_TIME: 800,
MIN_SEARCH_LENGTH: 3,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, this could be configurable, as it is on the backend. But for now, we can leave it as a const

@awalkowiak awalkowiak merged commit 23f3494 into develop May 20, 2026
@awalkowiak awalkowiak deleted the OBLS-744 branch May 20, 2026 09:09
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.

2 participants