Skip to content

Commit

Permalink
fix(web): keep installer options initial status on cancel (#1386)
Browse files Browse the repository at this point in the history
Reset the installer options to its initial values if users cancels.
  • Loading branch information
dgdavid authored Jun 26, 2024
1 parent cec1c2d commit 48c8514
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions web/package/agama-web-ui.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Jun 26 13:45:36 UTC 2024 - David Diaz <[email protected]>

- Reset installer options to its initial values before closing
the dialog on cancel (gh#openSUSE/agama#1386).

-------------------------------------------------------------------
Wed Jun 26 13:38:32 UTC 2024 - David Diaz <[email protected]>

Expand Down
6 changes: 5 additions & 1 deletion web/src/components/core/InstallerOptions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ export default function InstallerOptions() {
if (["/login", "/products/progress"].includes(location.pathname)) return;

const open = () => setIsOpen(true);
const close = () => setIsOpen(false);
const close = () => {
setLanguage(initialLanguage);
setKeymap(initialKeymap);
setIsOpen(false);
};

const onSubmit = async (e) => {
e.preventDefault();
Expand Down

0 comments on commit 48c8514

Please sign in to comment.