Skip to content

Commit f21155f

Browse files
committed
Default to using UserDefinedComponent for component renderer lookup
1 parent d207921 commit f21155f

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

mesop/web/src/component_renderer/component_renderer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ export class ComponentRenderer {
213213
};
214214
}
215215
const componentClass = typeName.getCoreModule()
216-
? typeToComponent[typeName.getFnName()!]
216+
? typeToComponent[typeName.getFnName()!] || UserDefinedComponent // Some core modules rely on UserDefinedComponent
217217
: UserDefinedComponent;
218218
// Need to insert at insertionRef and *not* viewContainerRef, otherwise
219219
// the component (e.g. <mesop-text> will not be properly nested inside <component-renderer>).

mesop/web/src/component_renderer/type_to_component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ export const typeToComponent = {
6666
// Textarea is a special case where it's exposed as a separate
6767
// component / API, but the implementation is almost identical as Input.
6868
'textarea': InputComponent,
69-
'button': UserDefinedComponent,
7069
'content_button': ButtonComponent,
71-
'checkbox': UserDefinedComponent,
7270
'content_checkbox': CheckboxComponent,
7371
'text': TextComponent,
7472
'markdown': MarkdownComponent,

0 commit comments

Comments
 (0)