docusaurus-openapi-docs
docusaurus-openapi-docs copied to clipboard
API call made on show params
Describe the bug
When show optional parameters is clicked on request form, it makes an API call, which is not expected.
Expected behavior
API call should not be made, it should be made only on pressing the SEND API BUTTON
Current behavior
API call made on clicking show optional params
Possible solution
Set Response action is dispatched, which should ideally not be dispatched in this case
Screenshots
https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/assets/76246084/7031f864-1556-4035-9a14-4f85593fbcc9
Your Environment
- Version used: 2.1.3
- Operating System and version (desktop or mobile):MacOS
@blindaa121 seems similar to #796, any idea why we're just noticing this issue? Is it reproducible on pan.dev?
@sserrata Hmm.. yeah let me look into this one. Issue is reproducible on pan.dev as well
Hi @sserrata @blindaa121 the issue here is that this button are in form tag and their default types are type="submit". We need to check and change them to type="button" or remove the form tag :).
@blindaa121 Are you still working on this one?