Unverified Commit a47e4a11 authored by Timothy Jaeryang Baek's avatar Timothy Jaeryang Baek Committed by GitHub
Browse files

Merge pull request #4047 from Peter-De-Ath/confirmDialog-add-inputValue

feat: add eventConfirmationInputValue handling in Chat.svelte
parents 312c8b9e cbe3694b
......@@ -80,6 +80,7 @@
let eventConfirmationMessage = '';
let eventConfirmationInput = false;
let eventConfirmationInputPlaceholder = '';
let eventConfirmationInputValue = '';
let eventCallback = null;
let showModelSelector = true;
......@@ -182,6 +183,7 @@
eventConfirmationTitle = data.title;
eventConfirmationMessage = data.message;
eventConfirmationInputPlaceholder = data.placeholder;
eventConfirmationInputValue = data?.value ?? '';
} else {
console.log('Unknown message type', data);
}
......@@ -1489,6 +1491,7 @@
message={eventConfirmationMessage}
input={eventConfirmationInput}
inputPlaceholder={eventConfirmationInputPlaceholder}
inputValue={eventConfirmationInputValue}
on:confirm={(e) => {
if (e.detail) {
eventCallback(e.detail);
......
......@@ -15,12 +15,12 @@
export let input = false;
export let inputPlaceholder = '';
export let inputValue = '';
export let show = false;
let modalElement = null;
let mounted = false;
let inputValue = '';
const handleKeyDown = (event: KeyboardEvent) => {
if (event.key === 'Escape') {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment