Add multiple ModelView child items at once (#14047)

This commit is contained in:
Charles Gagnon
2021-01-26 15:33:45 -08:00
committed by GitHub
parent d828a1f042
commit e79a80590a
10 changed files with 120 additions and 83 deletions

View File

@@ -91,7 +91,12 @@ export interface IComponent extends IDisposable {
layout(): void;
registerEventHandler(handler: (event: IComponentEventArgs) => void): IDisposable;
clearContainer?: () => void;
addToContainer?: (componentDescriptor: IComponentDescriptor, config: any, index?: number) => void;
/**
* Called when child components are added to this component
* @param items The list of items to add. Each item consists of a descriptor for identifying the component,
* the config defined and an optional index to insert it at
*/
addToContainer?: (items: { componentDescriptor: IComponentDescriptor, config: any, index?: number }[]) => void;
removeFromContainer?: (componentDescriptor: IComponentDescriptor) => void;
setLayout?: (layout: any) => void;
setItemLayout?: (componentDescriptor: IComponentDescriptor, config: any) => void;