[Bug] Auto-Focus Search Input upon Navigating to Global Search Route

Open Beginner friendly
#327 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
angular, typescript
Domain
frontend, search

Research direction

Start in src/app/features/search/ and inspect SearchComponent together with the Ionic search input. Reproduce navigation from the top header search bar to /search?q=query, then check the component lifecycle or effect used for focusing. Done means the search input is focused after the route loads and the query can be edited immediately.

Written by the indexing model from the issue text.

Description

bug good first issue navigation

Module: src/app/features/search/

Description
Navigating to /search?q=query from the top header search bar loads the Search page, but focus is not automatically retained on the input field.

Steps to Reproduce

  1. Click the top header search bar.
  2. Type a query and hit Enter.
  3. Page routes to /search, but the user has to click the search input field again to modify the query.

Expected Behavior
The search input on /search should automatically focus on page load (autofocus or viewChild focus call).

Proposed Implementation

  • Add (afterViewInit) or Effect in SearchComponent to call .setFocus() on the Ionic input component.
Dominant language
TypeScript
Stars
15
Forks
63
Avg merge
20h 3m
Merged PRs (30d)
76

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/fineract-backoffice-ui

All issues in apache/fineract-backoffice-ui

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.