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

feat: add eventConfirmationInputValue handling in Chat.svelte
This commit is contained in:
Timothy Jaeryang Baek
2024-07-24 12:16:45 +02:00
committed by GitHub
2 changed files with 4 additions and 1 deletions

View File

@@ -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);