Esri / calcite-design-system

A monorepo containing the packages for Esri's Calcite Design System
https://developers.arcgis.com/calcite-design-system/
Other
289 stars 76 forks source link

calcite-button#form where form is not submitted/reset when the buttons are mounted before the form #6751

Open brettephillips opened 1 year ago

brettephillips commented 1 year ago

Actual Behavior

Give a submit or reset button associated with a non-ancestor form, clicking the button does not submit/reset the form. This scenario does not work when the buttons are mounted before the form.

Expected Behavior

Give a submit or reset button associated with a non-ancestor form, clicking the button does submit/reset the form regardless of when the components have been mounted

Reproduction Sample

https://codesandbox.io/s/form-not-working-d5dc70?file=/src/App.js

Reproduction Steps

  1. Open the console and click the submit button and note "submitted" is not printed.

Reproduction Version

1.2.0

Relevant Info

No response

Regression?

No response

Priority impact

p4 - not time sensitive

Impact

No response

Esri team

ArcGIS Velocity

geospatialem commented 1 year ago

Stemmed from https://github.com/Esri/calcite-design-system/issues/5164

jcfranco commented 1 year ago

As a workaround, remounting or recreating the submit button will properly wire up form submission. I know this isn't ideal or possible in some cases, but it's one option.

geospatialem commented 1 year ago

Reallocating to January due to prioritization and staffing availability.

geospatialem commented 11 months ago

Efforts will be tackled in #8126 first targeted in March, and we will proceed with the following issue post-March.