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
- Add 2+
inx-search-form shortcodes to one page.
- Change filters in one form.
- 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.
Summary
With multiple
inx-search-formshortcodes 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-indexscoped).Actual
Counts are updated across unrelated forms.
Reproduction
inx-search-formshortcodes to one page.Suspected cause
In
src/js/property_search.js:$('.inx-property-search').on('search:change', ...)inx_state.search.number_of_matches = response.data(forformIndex === 0)form-index.