-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Radio button TypeError
in CI
#8307
Comments
Potential option for a fix: otherFocusableRadioButtons.filter(Boolean).forEach((radioButton) => {
forceUpdate(radioButton);
}); |
@geospatialem, I don't think that snippet is adequate since the I updated the issue description to clarify when I think the error is occurring:
|
Maybe we only call forceUpdate if the build is a browser? Something like if (Build.isBrowser) {
otherFocusableRadioButtons.filter(Boolean).forEach((radioButton) => {
forceUpdate(radioButton);
});
} |
|
@nwhittaker Are you still on version 1.11.0? v2 bumped the Stencil version, which fixed some component lifecycle issues we noticed. In any case, I think checking for |
@nwhittaker I'll reach out to you directly for more info as I haven't been able to repro. 😞 |
Quick update: reached out to @nwhittaker and he'll be testing with v2 to confirm whether the issue is still present. |
I tested with v2.1.0 and am seeing the same error: Error run: https://github.com/ArcGIS/acadia-web/actions/runs/7492111875/job/20394912129?pr=4492#step:5:661 |
This may no longer be an issue once #10310 lands. |
Issue #10310 has been closed, this issue is ready for re-evaluation. |
Spike to determine if the above PR mitigates the above. |
Hey @nwhittaker, when you get a chance could you please retest if this is still occurring after Calcite's framework migration (calcite-components version 3.0.0-next.55 is the latest version after migrating as I'm writing this comment). |
@DitwanP, I retested with Calcite |
Thanks for testing, @nwhittaker! Closing the above out as mitigated 🎉 |
Check existing issues
Actual Behavior
A
<calcite-radio-button-group>
within a storybookStoryFn
sometimes throws aTypeError: Cannot read properties of undefined (reading '$hostElement$')
error when running the storybook tests in CI.Expected Behavior
This error is not thrown.
Reproduction Sample
https://developers.arcgis.com/calcite-design-system/components/radio-button-group/
Reproduction Steps
I don't have a reduced test case since the issue is intermittent and likely stems from race conditions.
In a storybook
StoryFn
, I have this snippet within a custom component'sdetails
slot:The issue seems to have cropped up after recently upgrading to both Calcite 1.11 and Storybook 7.5.
Reproduction Version
1.11.0
Relevant Info
Looking at the stacktrace, I suspect
updateTabIndexOfOtherRadioButtonsInGroup()
is callingforceUpdate()
on the other<calcite-radio-button>
elements in the group after they're inserted into the DOM but before they've hydrated.Regression?
No response
Priority impact
p2 - want for current milestone
Impact
This issue impacts our PR process where we have to manually re-run these tests until they pass.
Calcite package
Esri team
ArcGIS Field Apps
The text was updated successfully, but these errors were encountered: