mirror of
https://github.com/open-webui/open-webui
synced 2025-06-25 17:57:20 +00:00
fix: confirm dialog input reset on show
This commit is contained in:
parent
e866fba27c
commit
fb26be7dd6
@ -25,11 +25,19 @@
|
|||||||
|
|
||||||
export let show = false;
|
export let show = false;
|
||||||
|
|
||||||
|
$: if (show) {
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
let modalElement = null;
|
let modalElement = null;
|
||||||
let mounted = false;
|
let mounted = false;
|
||||||
|
|
||||||
let focusTrap: FocusTrap.FocusTrap | null = null;
|
let focusTrap: FocusTrap.FocusTrap | null = null;
|
||||||
|
|
||||||
|
const init = () => {
|
||||||
|
inputValue = '';
|
||||||
|
};
|
||||||
|
|
||||||
const handleKeyDown = (event: KeyboardEvent) => {
|
const handleKeyDown = (event: KeyboardEvent) => {
|
||||||
if (event.key === 'Escape') {
|
if (event.key === 'Escape') {
|
||||||
console.log('Escape');
|
console.log('Escape');
|
||||||
|
Loading…
Reference in New Issue
Block a user