2
0

🐛 Fix auto filled input not submittable

Closes
This commit is contained in:
Baptiste Arnaud
2024-04-02 13:42:10 +02:00
parent 50d515cf37
commit a412a318c0
8 changed files with 8 additions and 8 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@typebot.io/js",
"version": "0.2.59",
"version": "0.2.60",
"description": "Javascript library to display typebots on your website",
"type": "module",
"main": "dist/index.js",

View File

@ -20,7 +20,7 @@ export const EmailInput = (props: Props) => {
const handleInput = (inputValue: string) => setInputValue(inputValue)
const checkIfInputIsValid = () =>
inputValue() !== '' && inputRef?.reportValidity()
inputRef?.value !== '' && inputRef?.reportValidity()
const submit = () => {
if (checkIfInputIsValid()) props.onSubmit({ value: inputValue() })

View File

@ -23,7 +23,7 @@ export const NumberInput = (props: NumberInputProps) => {
let inputRef: HTMLInputElement | undefined
const checkIfInputIsValid = () =>
inputValue() !== '' && inputRef?.reportValidity()
inputRef?.value !== '' && inputRef?.reportValidity()
const submit = () => {
if (checkIfInputIsValid())

View File

@ -57,7 +57,7 @@ export const PhoneInput = (props: PhoneInputProps) => {
}
const checkIfInputIsValid = () =>
inputValue() !== '' && inputRef?.reportValidity()
inputRef?.value !== '' && inputRef?.reportValidity()
const submit = () => {
const selectedCountryDialCode = phoneCountries.find(

View File

@ -20,7 +20,7 @@ export const TextInput = (props: Props) => {
const handleInput = (inputValue: string) => setInputValue(inputValue)
const checkIfInputIsValid = () =>
inputValue() !== '' && inputRef?.reportValidity()
inputRef?.value !== '' && inputRef?.reportValidity()
const submit = () => {
if (checkIfInputIsValid()) props.onSubmit({ value: inputValue() })

View File

@ -26,7 +26,7 @@ export const UrlInput = (props: Props) => {
}
const checkIfInputIsValid = () =>
inputValue() !== '' && inputRef?.reportValidity()
inputRef?.value !== '' && inputRef?.reportValidity()
const submit = () => {
if (checkIfInputIsValid()) props.onSubmit({ value: inputValue() })

View File

@ -1,6 +1,6 @@
{
"name": "@typebot.io/nextjs",
"version": "0.2.59",
"version": "0.2.60",
"description": "Convenient library to display typebots on your Next.js website",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@ -1,6 +1,6 @@
{
"name": "@typebot.io/react",
"version": "0.2.59",
"version": "0.2.60",
"description": "Convenient library to display typebots on your React app",
"main": "dist/index.js",
"types": "dist/index.d.ts",