mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-14 05:15:18 +00:00
fix: update Functions page after deleting a function
The Functions page was not updating after a function was deleted. This was because the local `functions` variable was not being updated after a successful deletion. This commit fixes the bug by filtering the deleted function from the local `functions` array, which triggers a UI refresh.
This commit is contained in:
parent
08bc00ea77
commit
244809bab7
1 changed files with 1 additions and 0 deletions
|
|
@ -158,6 +158,7 @@
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
toast.success($i18n.t('Function deleted successfully'));
|
toast.success($i18n.t('Function deleted successfully'));
|
||||||
|
functions = functions.filter((f) => f.id !== func.id);
|
||||||
|
|
||||||
_functions.set(await getFunctions(localStorage.token));
|
_functions.set(await getFunctions(localStorage.token));
|
||||||
models.set(
|
models.set(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue