Skip to content

[Bug] Multiple [inx-search-form] instances share/update "number of matches" across unrelated submit buttons #36

Description

@tobaco

Summary

With multiple inx-search-form shortcodes on one page, changing form A updates the submit-button match count in form B/C as well.

Expected

Each submit button should show only the count of its own form (form-index scoped).

Actual

Counts are updated across unrelated forms.

Reproduction

  1. Add 2+ inx-search-form shortcodes to one page.
  2. Change filters in one form.
  3. See submit-button counts changing in other forms too.

Suspected cause

In src/js/property_search.js:

  • Count update listener is attached globally:
    • $('.inx-property-search').on('search:change', ...)
  • Count update also writes a global fallback:
    • inx_state.search.number_of_matches = response.data (for formIndex === 0)
  • This can leak count state between form instances despite form-index.

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