Visit the code sample and open the dev tool's console
See the TypeError logged in the console
Reproduction Version
2.7.1
Relevant Info
Looking at the stack trace, it appears as though the filter's update render is setting messageOverrides on its <calcite-input> element which in turn attempts to call the input's onMessagesChange watch method which is undefined at that point due to the input having been disconnected.
TypeError: f[t] is not a function
at index.js:2464:38
at Array.map (<anonymous>)
at yt (index.js:2461:34)
at f.set [as messageOverrides] (index.js:2557:25)
at _ (index.js:926:29)
at K (index.js:999:9)
at nt (index.js:1577:17)
at Z (index.js:1356:13)
at nt (index.js:1583:13)
at Z (index.js:1356:13)
This issue may not be limited to the filter component. It may impact any component that, in their render() methods, set messageOverrides on another component.
Regression?
No response
Priority impact
p3 - want for upcoming milestone
Impact
Adds verbosity to console logs and can be a red herring when debugging other issues. Can also impact how layouts are designed to mitigate the presence of this error.
Check existing issues
Actual Behavior
If a
<calcite-filter>
element is in the middle of its update lifecycle when it's disconnected, it throws aTypeError
.Expected Behavior
If a
<calcite-filter>
element is in the middle of its update lifecycle when it's disconnected, it does not throw aTypeError
.Reproduction Sample
https://codepen.io/nwhittaker-esri/pen/LYvMQMm
Reproduction Steps
TypeError
logged in the consoleReproduction Version
2.7.1
Relevant Info
Looking at the stack trace, it appears as though the filter's update render is setting
messageOverrides
on its<calcite-input>
element which in turn attempts to call the input'sonMessagesChange
watch method which isundefined
at that point due to the input having been disconnected.This issue may not be limited to the
filter
component. It may impact any component that, in theirrender()
methods, setmessageOverrides
on another component.Regression?
No response
Priority impact
p3 - want for upcoming milestone
Impact
Adds verbosity to console logs and can be a red herring when debugging other issues. Can also impact how layouts are designed to mitigate the presence of this error.
Calcite package
Esri team
ArcGIS Field Apps