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 Closing DANDI API Key Modal on Submission #856

Merged
merged 7 commits into from
Jun 12, 2024
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ export class UploadsPage extends Page {
icon: keyIcon,
label: "API Keys",
onClick: () => {
document.body.append(this.#globalModal);
this.#globalModal.form.results = structuredClone(global.data.DANDI?.api_keys ?? {});
this.#globalModal.open = true;
},
Expand Down Expand Up @@ -253,9 +254,10 @@ export class UploadsPage extends Page {
merge(apiKeys, globalDandiData.api_keys);

global.save();
await regenerateDandisets();
const input = this.form.getFormElement(["dandisets"]);
input.requestUpdate();
regenerateDandisets().then(() => {
const input = this.form.getFormElement(["dandiset"]);
input.requestUpdate();
});
},
formProps: {
validateOnChange: async (name, parent) => {
Expand Down
Loading