🐛 (bot) Fix input prefill when linked to another typebot
This commit is contained in:
@ -41,8 +41,11 @@ export const InputChatBlock = ({
|
|||||||
|
|
||||||
const { variableId } = block.options
|
const { variableId } = block.options
|
||||||
const defaultValue =
|
const defaultValue =
|
||||||
typebot.settings.general.isInputPrefillEnabled ?? true
|
(typebot.settings.general.isInputPrefillEnabled ?? true) && variableId
|
||||||
? variableId && typebot.variables.find(byId(variableId))?.value
|
? typebot.variables.find(
|
||||||
|
(variable) =>
|
||||||
|
variable.name === typebot.variables.find(byId(variableId))?.name
|
||||||
|
)?.value
|
||||||
: undefined
|
: undefined
|
||||||
|
|
||||||
const handleSubmit = async ({ label, value, itemId }: InputSubmitContent) => {
|
const handleSubmit = async ({ label, value, itemId }: InputSubmitContent) => {
|
||||||
|
Reference in New Issue
Block a user