[Chip] setting "selected" before render() throws an error #10434
Labels
4 - verified
Issues that have been released and confirmed resolved.
ArcGIS Maps SDK for JavaScript
Issues logged by ArcGIS SDK for JavaScript team members.
bug
Bug reports for broken functionality. Issues should include a reproduction of the bug.
calcite-components
Issues specific to the @esri/calcite-components package.
estimate - 3
A day or two of work, likely requires updates to tests.
impact - p3 - not time sensitive
User set priority impact status of p3 - not time sensitive
Milestone
Check existing issues
Actual Behavior
If you set "component.selected=true" prop before calcite-chip component had it's render(), an exception will be throw here because
this.parentChipGroup
is still undefined:calcite-design-system/packages/calcite-components/src/components/chip/chip.tsx
Line 325 in def59bb
Expected Behavior
There should not be an exception
Reproduction Sample
https://codepen.io/maxpatiiuk/pen/xxvwwRE?editors=1010
Reproduction Steps
"none"
..selected=true
property or a calcite-chip after component's constructor() triggered but before render().Reproduction Version
2.13.0
Relevant Info
No response
Regression?
No response
Priority impact
impact - p3 - not time sensitive
Impact
No response
Calcite package
Esri team
ArcGIS Maps SDK for JavaScript
The text was updated successfully, but these errors were encountered: