Objective
Enhance the lazy loading functionality in CBWIRE by automatically setting any passed-in parameters to the data properties of the component, even when an onMount method is not defined.
Details
When using CBWIRE to lazy load a component and passing parameters, it is currently necessary to define an onMount(params) method in the component and manually assign the parameters to the data properties. For example:
#wire( name="SimilarStyles", params={ "apparelId": apparelId }, lazy=true )#
This requires the component to have an onMount method like:
onMount(params) {
this.data.apparelId = params.apparelId;
}
If the onMount method is not defined, the parameters are not automatically set. However, when not lazy loading, CBWIRE already handles this automatic parameter setting. The goal is to extend this functionality to lazy loaded components, allowing for a more seamless and less error-prone experience.
Expected Functionality
CBWIRE should automatically set any passed-in parameters to the data properties of a component, even when the component is lazy loaded and no onMount method is defined.
This will align the behavior of lazy loaded components with that of non-lazy loaded components, reducing the need for redundant code and potential errors.
Objective
Enhance the lazy loading functionality in CBWIRE by automatically setting any passed-in parameters to the data properties of the component, even when an
onMountmethod is not defined.Details
When using CBWIRE to lazy load a component and passing parameters, it is currently necessary to define an
onMount(params)method in the component and manually assign the parameters to the data properties. For example:This requires the component to have an onMount method like:
If the onMount method is not defined, the parameters are not automatically set. However, when not lazy loading, CBWIRE already handles this automatic parameter setting. The goal is to extend this functionality to lazy loaded components, allowing for a more seamless and less error-prone experience.
Expected Functionality
CBWIRE should automatically set any passed-in parameters to the data properties of a component, even when the component is lazy loaded and no onMount method is defined.
This will align the behavior of lazy loaded components with that of non-lazy loaded components, reducing the need for redundant code and potential errors.