File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,10 +48,12 @@ class DesignDialogFormComponent extends UiStatefulComponent2<DesignDialogFormPro
4848 var new_props = typedPropsFactory (nextPropsUntyped);
4949 var prev_state = typedStateFactory (prevStateUntyped);
5050 if (new_props.dialog != null ) {
51- Dialog dialog = new_props.dialog! ;
52- // next if statement is true if the Dialog has just popped up, so user hasn't typed any
53- // current responses yet, though some may be saved in TODO: saved where?
54- if (prev_state.current_responses == null ) {
51+ // next if statement is true if the Dialog has just popped up,
52+ // OR if the dialog type changes (e.g., if the user has one dialog open and then opens another),
53+ // In either case, user hasn't typed any current responses for this dialog type yet,
54+ // though some may be saved in TODO: saved where?
55+ if (prev_state.current_responses == null || new_props.dialog! .type != prev_state.dialog_type) {
56+ Dialog dialog = new_props.dialog! ;
5557 assert (dialog.process_saved_response != null );
5658 var dialog_type = dialog.type;
5759 return newState ()
You can’t perform that action at this time.
0 commit comments