Bug Report
- Package version(s): 5.49.3
Priorities and help requested (not applicable if asking question):
Are you willing to submit a PR to fix? Yes
Requested priority: Normal
Describe the issue:
While converting the Layer component to mergeStyles I added the @Customizable decorator to the LayerBase (Formerly Layer) class and found that the sibling component, LayerHost, could no longer access static functions in LayerBase. After debugging I have concluded that the @Customizable decorator was the cause. Since Layer does not currently require theme elements I have gone ahead and submitted the pull request with the decorator commented out, but this could definably be an issue in the future on other Components with static functions.
Actual behavior:
LayerHost could not access static functions in LayerBase when using @Customizable decorator. Console error: TypeError: Layer_base_1.LayerBase.notifyHostChanged is not a function.
Tested same setup on SearchBox with a Test static function and clean test sibling component and yielded the same result.
Tested a simple decorator (not @Customizable) in a codepen https://codepen.io/oengusmacinog/pen/OQxmLE and did not reproduce the issue, leading me to believe it is probably @Customizable not decorators in general.
Expected behavior:
Static functions in a class work as expected when using the @Customizable decorator.
Bug Report
Priorities and help requested (not applicable if asking question):
Are you willing to submit a PR to fix? Yes
Requested priority: Normal
Describe the issue:
While converting the Layer component to mergeStyles I added the @Customizable decorator to the LayerBase (Formerly Layer) class and found that the sibling component, LayerHost, could no longer access static functions in LayerBase. After debugging I have concluded that the @Customizable decorator was the cause. Since Layer does not currently require theme elements I have gone ahead and submitted the pull request with the decorator commented out, but this could definably be an issue in the future on other Components with static functions.
Actual behavior:
LayerHost could not access static functions in LayerBase when using @Customizable decorator. Console error:
TypeError: Layer_base_1.LayerBase.notifyHostChanged is not a function.Tested same setup on SearchBox with a Test static function and clean test sibling component and yielded the same result.
Tested a simple decorator (not @Customizable) in a codepen https://codepen.io/oengusmacinog/pen/OQxmLE and did not reproduce the issue, leading me to believe it is probably @Customizable not decorators in general.
Expected behavior:
Static functions in a class work as expected when using the @Customizable decorator.