Describe the bug
LWC that use a locally extended class in the JavaScript file are not shown in the list of components. Also, the base class is listed, but does not render without the default tag in the definition.
To Reproduce
Steps to reproduce the behavior:
Define LWC components: baseObject, derivedObject
<template>
<p>This is base object {data.postId}</p>
</template>
import { LightningElement, api } from 'lwc';
export class BaseObject extends LightningElement {
@api data = {
"postId": "6b1820cf-ce22-461c-a692-bc3f537121c4",
"title": "CORONAVIRUS: Resources for Executives and Communicators",
"description": "Information To Help Guide You Through A Challenging Time",
};
}```
```html
<template>
<p>This is derived object {data.postId}</p>
</template>
import { BaseObject} from 'c/baseObject';
export default class DerivedObject extends BaseObject {
}
Observe that baseObject is in the list of components, but derivedObject is not.
Click on 'baseObject'
Observe the spinner running forever
Expected behavior
baseObject and derivedObject are in the list of components, and both are clickable.
Clicking on baseObject renders the object.
Clicking on derivedObject renders the derived object.
Describe the bug LWC that use a locally extended class in the JavaScript file are not shown in the list of components. Also, the base class is listed, but does not render without the
default
tag in the definition.To Reproduce Steps to reproduce the behavior:
Expected behavior baseObject and derivedObject are in the list of components, and both are clickable. Clicking on baseObject renders the object. Clicking on derivedObject renders the derived object.
Screenshots baseObject "render" (called base-post here)
Desktop: