aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/app/views/timeline-common/TimelinePropertyChangeDialog.tsx
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-02-13 16:35:39 +0800
committercrupest <crupest@outlook.com>2021-02-13 16:35:39 +0800
commitb9703104b5b416dd3211adedb878d1916072c96d (patch)
tree013269a755ca929705f5d26494dfea48bcf8383b /FrontEnd/src/app/views/timeline-common/TimelinePropertyChangeDialog.tsx
parent17272858aaf09eac5a3550b23e97f8d339847bd9 (diff)
downloadtimeline-b9703104b5b416dd3211adedb878d1916072c96d.tar.gz
timeline-b9703104b5b416dd3211adedb878d1916072c96d.tar.bz2
timeline-b9703104b5b416dd3211adedb878d1916072c96d.zip
...
Diffstat (limited to 'FrontEnd/src/app/views/timeline-common/TimelinePropertyChangeDialog.tsx')
-rw-r--r--FrontEnd/src/app/views/timeline-common/TimelinePropertyChangeDialog.tsx9
1 files changed, 5 insertions, 4 deletions
diff --git a/FrontEnd/src/app/views/timeline-common/TimelinePropertyChangeDialog.tsx b/FrontEnd/src/app/views/timeline-common/TimelinePropertyChangeDialog.tsx
index b99ec267..a5628a9a 100644
--- a/FrontEnd/src/app/views/timeline-common/TimelinePropertyChangeDialog.tsx
+++ b/FrontEnd/src/app/views/timeline-common/TimelinePropertyChangeDialog.tsx
@@ -10,12 +10,11 @@ import {
import OperationDialog from "../common/OperationDialog";
-// TODO: Trigger resync.
-
export interface TimelinePropertyChangeDialogProps {
open: boolean;
close: () => void;
timeline: HttpTimelineInfo;
+ onChange: () => void;
}
const labelMap: { [key in TimelineVisibility]: string } = {
@@ -27,7 +26,7 @@ const labelMap: { [key in TimelineVisibility]: string } = {
const TimelinePropertyChangeDialog: React.FC<TimelinePropertyChangeDialogProps> = (
props
) => {
- const { timeline } = props;
+ const { timeline, onChange } = props;
return (
<OperationDialog
@@ -66,7 +65,9 @@ const TimelinePropertyChangeDialog: React.FC<TimelinePropertyChangeDialogProps>
if (newDescription !== timeline.description) {
req.description = newDescription;
}
- return getHttpTimelineClient().patchTimeline(timeline.name, req);
+ return getHttpTimelineClient()
+ .patchTimeline(timeline.name, req)
+ .then(onChange);
}}
/>
);