algolia / algolia/instantsearch

Buttons should have a type "button" ?

Open
#5,264 4 comments 1 reaction 0 assignees View on GitHub
Library: React InstantSearch < 7
Dominant language
TypeScript
Stars
4.1k
Forks
553
Avg merge
1d 11h
Merged PRs (30d)
51

Description

It appears that in the latest version of React InstantSearch (5.3.2) the "Show More" button when used in a `` does not have `type="button"` on the button itself. Some browsers interpret this as a submit button and will attempt to submit a parent `` element if clicked. Can `type="button"` be added so that clicking this only interacts with the `` options?

Contributor guide

Open the contributing guide

Research direction

Locate the React InstantSearch RefinementList implementation and its Show More button. Check the existing component tests or relevant test entry point, then verify that clicking Show More inside a form no longer submits the form and that the button retains its intended option-interaction behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.