mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 09:35:36 -05:00
Genericify components (#12158)
* Genericify components * Fix compile issue * Fix feedback * Genericify azdata components (#12164) * azdata generics * Add the withProps method to azdata proposed as there may be mistakes with the interfaces in the generics * Fix build issues because of other extensions * Remove extra spaces
This commit is contained in:
@@ -22,7 +22,7 @@ import { PROPERTIES_CONTAINER_PROPERTY_NAME, PROPERTIES_CONTAINER_PROPERTY_VALUE
|
||||
<properties-container> </properties-container>
|
||||
`
|
||||
})
|
||||
export default class PropertiesContainerComponent extends ComponentBase implements IComponent, OnDestroy {
|
||||
export default class PropertiesContainerComponent extends ComponentBase<azdata.PropertiesContainerComponentProperties> implements IComponent, OnDestroy {
|
||||
@Input() descriptor: IComponentDescriptor;
|
||||
@Input() modelStore: IModelStore;
|
||||
|
||||
@@ -48,11 +48,11 @@ export default class PropertiesContainerComponent extends ComponentBase implemen
|
||||
}
|
||||
|
||||
public get propertyItems(): PropertyItem[] {
|
||||
return this.getPropertyOrDefault<azdata.PropertiesContainerComponentProperties, azdata.PropertiesContainerItem[]>((props) => props.propertyItems, []);
|
||||
return this.getPropertyOrDefault<azdata.PropertiesContainerItem[]>((props) => props.propertyItems, []);
|
||||
}
|
||||
|
||||
public set propertyItems(newValue: azdata.PropertiesContainerItem[]) {
|
||||
this.setPropertyFromUI<azdata.PropertiesContainerComponentProperties, azdata.PropertiesContainerItem[]>((props, value) => props.propertyItems = value, newValue);
|
||||
this.setPropertyFromUI<azdata.PropertiesContainerItem[]>((props, value) => props.propertyItems = value, newValue);
|
||||
this._propertiesContainer.propertyItems = newValue;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user