-
Notifications
You must be signed in to change notification settings - Fork 76
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
[combobox] Uncaught type errors are thrown #9321
Comments
Dug a bit and this is caused by this line. It seems the window In terms of workaround, you could toggle the component's {(
<CalciteCombobox hidden={!show}>
<CalciteComboboxItem value="1" textLabel="One" />
<CalciteComboboxItem value="2" textLabel="Two" />
</CalciteCombobox>
)} or setting function App() {
const [show, setShow] = useState(false);
const [workaround, setWorkaround] = useState(true);
return (
<>
<button onClick={() => setShow(!show)}>Toggle</button>
{show && (
<CalciteCombobox allowCustomValues={workaround} ref={() =>
requestAnimationFrame(() => setWorkaround(undefined))}>
<CalciteComboboxItem value="1" textLabel="One" />
<CalciteComboboxItem value="2" textLabel="Two" />
</CalciteCombobox>
)}
</>
);
} |
… component is appended to the DOM (#9373) **Related Issue:** #9321 ## Summary This fixes an issue where references to internal elements were undefined in the window-level click handler. This would happen because the window click handler was added when the component was connected, but before its internals were rendered.
… component is appended to the DOM (#9373) **Related Issue:** #9321 ## Summary This fixes an issue where references to internal elements were undefined in the window-level click handler. This would happen because the window click handler was added when the component was connected, but before its internals were rendered.
… component is appended to the DOM (#9380) **Related Issue:** #9321 ## Summary This fixes an issue where references to internal elements were undefined in the window-level click handler. This would happen because the window click handler was added when the component was connected, but before its internals were rendered. Co-authored-by: JC Franco <jfranco@esri.com>
Installed and assigned for verification. |
…nts) output when a click is emitted when the component is appended to the DOM (#9423) **Related Issue:** #9321 ## Summary This updates the combobox window-click listener to use an internal state property for its text instead of getting the value of the internal input. The `componentOnReady` util helps normalize waiting for a component to be ready in both output targets (based on [Ionic's helper](https://github.com/ionic-team/ionic-framework/blob/5cdfa1aaf47a6160cd1bd2be434dcfa8390b56e1/core/src/utils/helpers.ts#L60-L79)). This is sufficient for most scenarios, but for this particular case, it was running earlier than `connectedCallback` due to the emitted click as the component is appended and initialized, so the component is not yet rendered by the time the util resolves. **Note**: there are no accompanying tests as this is not reproducible in the test environment, which uses the lazy-loaded output.
Installed and assigned for verification. |
…nts) output when a click is emitted when the component is appended to the DOM (#9423) **Related Issue:** #9321 ## Summary This updates the combobox window-click listener to use an internal state property for its text instead of getting the value of the internal input. The `componentOnReady` util helps normalize waiting for a component to be ready in both output targets (based on [Ionic's helper](https://github.com/ionic-team/ionic-framework/blob/5cdfa1aaf47a6160cd1bd2be434dcfa8390b56e1/core/src/utils/helpers.ts#L60-L79)). This is sufficient for most scenarios, but for this particular case, it was running earlier than `connectedCallback` due to the emitted click as the component is appended and initialized, so the component is not yet rendered by the time the util resolves. **Note**: there are no accompanying tests as this is not reproducible in the test environment, which uses the lazy-loaded output.
…nts) output when a click is emitted when the component is appended to the DOM (#9423) **Related Issue:** #9321 ## Summary This updates the combobox window-click listener to use an internal state property for its text instead of getting the value of the internal input. The `componentOnReady` util helps normalize waiting for a component to be ready in both output targets (based on [Ionic's helper](https://github.com/ionic-team/ionic-framework/blob/5cdfa1aaf47a6160cd1bd2be434dcfa8390b56e1/core/src/utils/helpers.ts#L60-L79)). This is sufficient for most scenarios, but for this particular case, it was running earlier than `connectedCallback` due to the emitted click as the component is appended and initialized, so the component is not yet rendered by the time the util resolves. **Note**: there are no accompanying tests as this is not reproducible in the test environment, which uses the lazy-loaded output.
🍪 Verified on |
Check existing issues
Actual Behavior
Calcite combobox throws type errors in the console logs
Expected Behavior
No uncaught type errors
Reproduction Sample
https://github.com/mpayson/calcite-debug
Reproduction Steps
combobox-repo
In the reproduction case, the type error is:
In our app, this is the type error, it happens for comboboxes across our app
Additional notes:
Reproduction Version
2.8.0
Relevant Info
No response
Regression?
No response
Priority impact
p1 - need for current milestone
Impact
No response
Calcite package
Esri team
ArcGIS Online
The text was updated successfully, but these errors were encountered: