Using the Pagination component, if you place it inside a form on next/previous button click it will submit the form
Is this a feature request (new component, new icon), a bug, or a general issue?
this is a bug
Is this issue related to a specific component?
yes, the Pagination component
What did you expect to happen? What happened instead? What would you like to see changed?
upon next/previous page click it should not submit any form, but change the page
What browser are you working in?
Chrome Version 98.0.4758.80 (Official Build) (64-bit)
Firefox Version 96.0.3 (64-bit)
What version of the WFP UI (Carbon Design System) are you using?
1.17.1
What offering/product do you work on? Any pressing ship or release dates we should be aware of?
enhancing the Goods Transport Form for the Service Market Place web app, it would be so nice to have fixed before April the 8th 2022 that we will showcase the new features including goods item pagination during the sprint demo.
Additional information
The fix is just to add a type attribute to the next and previous <button> something like <button type="button"></button> if you don't specify the type, the default type that is picked is submit and it will cause the unwanted form submission. I can open a PR with a quick fix for this. So far I just created a custom Pagination component locally starting from your codebase with the aforementioned fix and it works like a charm :rocket:
Detailed description
Using the Pagination component, if you place it inside a form on next/previous button click it will submit the form
this is a bug
yes, the Pagination component
upon next/previous page click it should not submit any form, but change the page
Chrome Version 98.0.4758.80 (Official Build) (64-bit) Firefox Version 96.0.3 (64-bit)
1.17.1
enhancing the Goods Transport Form for the Service Market Place web app, it would be so nice to have fixed before April the 8th 2022 that we will showcase the new features including goods item pagination during the sprint demo.
Additional information
The fix is just to add a
type
attribute to the next and previous<button>
something like<button type="button"></button>
if you don't specify the type, the default type that is picked issubmit
and it will cause the unwanted form submission. I can open a PR with a quick fix for this. So far I just created a customPagination
component locally starting from your codebase with the aforementioned fix and it works like a charm :rocket: