FormFlow State doesn't properly reset on FormCanceledException
See original GitHub issueThis stems from @paul198204’s (@EricDahlvang: this is Praveen) issue where basically:
- User starts FormFlow Dialog
- User says “quit” and bot cancels all dialogs
- User attempts to restart FormFlow Dialog, but instead continues where they left off
Not being familiar with FormFlow, I’m posting this here for additional help.
My guess is that the else
clause from here should call _formState.Reset()
:
catch (Exception inner)
{
if (!(inner is FormCanceledException<T>))
{
throw new FormCanceledException<T>(inner.Message, inner)
{
LastForm = _state,
Last = _form.Steps[_formState.Step].Name,
Completed = (from step in _form.Steps
where _formState.Phase(_form.StepIndex(step)) == StepPhase.Completed
select step.Name).ToArray()
};
}
// HERE
else
{
throw;
}
}
}
I also considered recommending that the user call Reset()
manually since it’s public in FormState. However, they’d like to call it from outside of FormDialog
but FormDialog
has _formState
private.
There’s likely a way to do this, but again, I’m not very familiar with FormFlow.
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (11 by maintainers)
Top Results From Across the Web
The resetForm method of Formik does not work as expected
I'm using Formik in my application and I want to cancel changes made to a form and revert it to its initial values...
Read more >Webdocs Forms Management
Table control populated from database by business rule does not delete rows properly. Reports are not visible in Portals for users with frevvo.Reports...
Read more >Version 7.2.x Release Notes
Form Fixes. [DT-024878] Form Control: Multi-Select DropDown: Initial Text Not Restricted to List property not working as expected.
Read more >Resetting A TelerikForm in Blazor back to Pristine State
I have a need to reset the form and it's validation back to a pristine state (blank form with validation) either when the...
Read more >Version 4
Decisions 4.0 is a major release of Decisions that is a complete HTML rewrite of the Flow, Rule, Form, and Page designer.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am of the opinion we should close this issue until we have other complaints. There are a lot of people using this library as-is, and they do not seem to behaving problems. If we get other complaints, it might become worth the risk of updating.
Agreed. Closing.