Fix for broken checkbox status in checkbox tree node (#2705)

This commit is contained in:
Gene Lee
2018-10-01 16:58:22 -07:00
committed by GitHub
parent 0e61ad27da
commit a0c30517bd
2 changed files with 5 additions and 4 deletions

View File

@@ -82,9 +82,10 @@ export default class TreeComponent extends ComponentBase implements IComponent,
}
public refreshDataProvider(itemsToRefreshByHandle: { [treeItemHandle: string]: ITreeComponentItem }): void {
// if (this._dataProvider) {
// const itemsToRefresh = this._dataProvider.getItemsToRefresh(itemsToRefreshByHandle);
// }
if (this._dataProvider) {
this._dataProvider.getItemsToRefresh(itemsToRefreshByHandle);
}
if (this._tree) {
for (const item of Object.values(itemsToRefreshByHandle)) {
this._tree.refresh(<ITreeComponentItem>item);

View File

@@ -142,7 +142,7 @@ export class TreeComponentRenderer extends Disposable implements IRenderer {
if (element) {
element.onCheckedChanged = (checked: boolean) => {
this._dataProvider.onNodeCheckedChanged(element.handle, checked);
}
};
templateData.model = element;
}
if (templateId === TreeComponentRenderer.DEFAULT_TEMPLATE) {