🐛 Fix auto filled input not submittable
Closes
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@typebot.io/js",
|
"name": "@typebot.io/js",
|
||||||
"version": "0.2.59",
|
"version": "0.2.60",
|
||||||
"description": "Javascript library to display typebots on your website",
|
"description": "Javascript library to display typebots on your website",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
@ -20,7 +20,7 @@ export const EmailInput = (props: Props) => {
|
|||||||
const handleInput = (inputValue: string) => setInputValue(inputValue)
|
const handleInput = (inputValue: string) => setInputValue(inputValue)
|
||||||
|
|
||||||
const checkIfInputIsValid = () =>
|
const checkIfInputIsValid = () =>
|
||||||
inputValue() !== '' && inputRef?.reportValidity()
|
inputRef?.value !== '' && inputRef?.reportValidity()
|
||||||
|
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
if (checkIfInputIsValid()) props.onSubmit({ value: inputValue() })
|
if (checkIfInputIsValid()) props.onSubmit({ value: inputValue() })
|
||||||
|
@ -23,7 +23,7 @@ export const NumberInput = (props: NumberInputProps) => {
|
|||||||
let inputRef: HTMLInputElement | undefined
|
let inputRef: HTMLInputElement | undefined
|
||||||
|
|
||||||
const checkIfInputIsValid = () =>
|
const checkIfInputIsValid = () =>
|
||||||
inputValue() !== '' && inputRef?.reportValidity()
|
inputRef?.value !== '' && inputRef?.reportValidity()
|
||||||
|
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
if (checkIfInputIsValid())
|
if (checkIfInputIsValid())
|
||||||
|
@ -57,7 +57,7 @@ export const PhoneInput = (props: PhoneInputProps) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const checkIfInputIsValid = () =>
|
const checkIfInputIsValid = () =>
|
||||||
inputValue() !== '' && inputRef?.reportValidity()
|
inputRef?.value !== '' && inputRef?.reportValidity()
|
||||||
|
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
const selectedCountryDialCode = phoneCountries.find(
|
const selectedCountryDialCode = phoneCountries.find(
|
||||||
|
@ -20,7 +20,7 @@ export const TextInput = (props: Props) => {
|
|||||||
const handleInput = (inputValue: string) => setInputValue(inputValue)
|
const handleInput = (inputValue: string) => setInputValue(inputValue)
|
||||||
|
|
||||||
const checkIfInputIsValid = () =>
|
const checkIfInputIsValid = () =>
|
||||||
inputValue() !== '' && inputRef?.reportValidity()
|
inputRef?.value !== '' && inputRef?.reportValidity()
|
||||||
|
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
if (checkIfInputIsValid()) props.onSubmit({ value: inputValue() })
|
if (checkIfInputIsValid()) props.onSubmit({ value: inputValue() })
|
||||||
|
@ -26,7 +26,7 @@ export const UrlInput = (props: Props) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const checkIfInputIsValid = () =>
|
const checkIfInputIsValid = () =>
|
||||||
inputValue() !== '' && inputRef?.reportValidity()
|
inputRef?.value !== '' && inputRef?.reportValidity()
|
||||||
|
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
if (checkIfInputIsValid()) props.onSubmit({ value: inputValue() })
|
if (checkIfInputIsValid()) props.onSubmit({ value: inputValue() })
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@typebot.io/nextjs",
|
"name": "@typebot.io/nextjs",
|
||||||
"version": "0.2.59",
|
"version": "0.2.60",
|
||||||
"description": "Convenient library to display typebots on your Next.js website",
|
"description": "Convenient library to display typebots on your Next.js website",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@typebot.io/react",
|
"name": "@typebot.io/react",
|
||||||
"version": "0.2.59",
|
"version": "0.2.60",
|
||||||
"description": "Convenient library to display typebots on your React app",
|
"description": "Convenient library to display typebots on your React app",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
Reference in New Issue
Block a user