Skip to content

Search API is triggered multiple times across modules even when no data is available #1413

@ajay-kumawat1

Description

@ajay-kumawat1

Search API Triggered Multiple Times When No Data Is Available

Description

I observed that the search API is being called multiple times unnecessarily across several modules such as Quotes, Invoices, Payments, and other sections, even when there is no data available.

Observed Behavior

  • On initial page load of modules like Quotes / Invoices / Payments, the search request is triggered multiple times automatically.
  • The Network tab shows repeated search API calls with the same parameters.
  • The API returns a successful response with empty data.
  • The UI correctly displays a “No data” state, but repeated API calls still occur.
  • No user interaction (search input, refresh, pagination, or filters) is performed.

Expected Behavior

  • The search API should be triggered only once on initial load.
  • When the response contains no data, additional automatic calls should not be triggered.
  • Search calls should happen again only on explicit user actions, such as:
    • Typing in the search input
    • Clicking refresh
    • Changing filters or pagination

Impact

  • Unnecessary network requests across multiple pages.
  • Increased backend load.
  • Potential performance issues as the application scales.

Additional Notes

  • Issue is reproducible consistently across multiple modules.
  • Appears to be caused by shared or global search logic.
  • Screenshots attached showing repeated calls in the Network tab.
Image Image

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