Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(web): keep installer options initial status on cancel #1386

Merged
merged 2 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <dgonzalez@suse.com>

- 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 <dgonzalez@suse.com>

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
Loading