As the title described, the modal should not remove the value while closing the modal: from the UX point of view, the user expects the X button will not delete his previous selection, but just dismiss the modal. I know there is a backButton, but even in this case, a modal (so a page that came from bottom to top) without navigation should not have a back arrow, because it assumes there is a page before and not behind it.
As you can see, the state will update with an empty object when the user closes the modal.
So, after that, the question is: is an architecture behavior to clear the selectedObject?
As the title described, the modal should not remove the value while closing the modal: from the UX point of view, the user expects the
X
button will not delete his previous selection, but just dismiss the modal. I know there is abackButton
, but even in this case, a modal (so a page that came from bottom to top) without navigation should not have a back arrow, because it assumes there is a page before and not behind it.In fact, in the code you can find:
As you can see, the state will update with an empty object when the user closes the modal. So, after that, the question is: is an architecture behavior to clear the
selectedObject
?Otherwise, I can even make a PR to update this.
Hoping my point it's clear.