Skip to content

Commit 6178901

Browse files
committed
make container also a property of component state
1 parent 58ee89f commit 6178901

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dashi/src/state/component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export type ComponentType = "Button" | "Dropdown" | "Plot" | "Box";
66
export interface ComponentState {
77
type: ComponentType;
88
label?: string;
9+
components?: ComponentState[];
910
// common HTML attributes
1011
id?: string;
1112
name?: string;
@@ -20,7 +21,7 @@ export interface ContainerState extends ComponentState {
2021
export function isContainerState(
2122
componentModel: ComponentState,
2223
): componentModel is ContainerState {
23-
return !!(componentModel as ContainerState).components;
24+
return !!componentModel.components;
2425
}
2526

2627
export interface DropdownState extends ComponentState {

0 commit comments

Comments
 (0)