fix: remove repeated rows when repeat was disabled. (#10653)

This commit is contained in:
Alexander Zobnin
2018-01-29 15:17:27 +01:00
committed by Torkel Ödegaard
parent 04053ec56c
commit 479658489a
@@ -27,6 +27,7 @@ export class DashboardRow extends React.Component<DashboardRowProps, any> {
this.toggle = this.toggle.bind(this);
this.openSettings = this.openSettings.bind(this);
this.delete = this.delete.bind(this);
this.update = this.update.bind(this);
}
toggle() {
@@ -37,13 +38,18 @@ export class DashboardRow extends React.Component<DashboardRowProps, any> {
});
}
update() {
this.dashboard.processRepeats();
this.forceUpdate();
}
openSettings() {
appEvents.emit('show-modal', {
templateHtml: `<row-options row="model.row" on-updated="model.onUpdated()" dismiss="dismiss()"></row-options>`,
modalClass: 'modal--narrow',
model: {
row: this.props.panel,
onUpdated: this.forceUpdate.bind(this),
onUpdated: this.update.bind(this),
},
});
}