fix(dashboard): fix editing visibility privacy not changing header

This commit is contained in:
Jake Fulmine 2022-08-22 13:49:42 +02:00
parent 877b2cdf21
commit 34926660c8
4 changed files with 17 additions and 5 deletions

View file

@ -1,5 +1,5 @@
<script lang="ts">
import { tick } from "svelte";
import { tick, createEventDispatcher } from "svelte";
import { ModalBody, ModalHeader, Col, Row, Input, Label, ModalFooter, Button, Spinner, Alert } from "sveltestrap";
import { Group, GroupPrivacy } from '../../api/types';
@ -18,6 +18,12 @@
Object.keys(privacy).forEach(x => privacy[x] = target.value);
}
const dispatch = createEventDispatcher();
function update(group) {
dispatch('update', group);
}
// I can't use the hacked together Required<T> type from the bulk privacy here
// that breaks updating the displayed privacy after submitting
// but there's not really any way for any privacy fields here to be missing