mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-13 01:00:12 +00:00
fix: fix group list not updating when group gets edited
This commit is contained in:
parent
6c6f6d986c
commit
d87b16014f
3 changed files with 16 additions and 4 deletions
|
|
@ -1,5 +1,6 @@
|
|||
<script lang="ts">
|
||||
import { Row, Col, Input, Button, Label, Alert } from 'sveltestrap';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import Group from '../../api/group';
|
||||
import PKAPI from '../../api';
|
||||
import autosize from 'svelte-autosize';
|
||||
|
|
@ -12,6 +13,12 @@
|
|||
|
||||
let input = new Group(group);
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
function update() {
|
||||
dispatch('update', group);
|
||||
}
|
||||
|
||||
async function submit() {
|
||||
let data = input;
|
||||
err = [];
|
||||
|
|
@ -33,6 +40,7 @@
|
|||
let res = await api.patchGroup({token: localStorage.getItem("pk-token"), id: group.id, data: data});
|
||||
group = res;
|
||||
err = [];
|
||||
update();
|
||||
editMode = false;
|
||||
loading = false;
|
||||
} catch (error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue