@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@typebot.io/js",
|
||||
"version": "0.1.29",
|
||||
"version": "0.1.30",
|
||||
"description": "Javascript library to display typebots on your website",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
|
@ -21,8 +21,7 @@ export const Buttons = (props: Props) => {
|
||||
if (!isMobile() && inputRef) inputRef.focus()
|
||||
})
|
||||
|
||||
// eslint-disable-next-line solid/reactivity
|
||||
const handleClick = (itemIndex: number) => () =>
|
||||
const handleClick = (itemIndex: number) =>
|
||||
props.onSubmit({ value: filteredItems()[itemIndex].content ?? '' })
|
||||
|
||||
const filterItems = (inputValue: string) => {
|
||||
@ -61,7 +60,7 @@ export const Buttons = (props: Props) => {
|
||||
{(item, index) => (
|
||||
<span class={'relative' + (isMobile() ? ' w-full' : '')}>
|
||||
<Button
|
||||
on:click={handleClick(index())}
|
||||
on:click={() => handleClick(index())}
|
||||
data-itemid={item.id}
|
||||
class="w-full"
|
||||
>
|
||||
|
@ -19,8 +19,7 @@ export const SinglePictureChoice = (props: Props) => {
|
||||
if (!isMobile() && inputRef) inputRef.focus()
|
||||
})
|
||||
|
||||
// eslint-disable-next-line solid/reactivity
|
||||
const handleClick = (itemIndex: number) => () => {
|
||||
const handleClick = (itemIndex: number) => {
|
||||
const pictureSrc = filteredItems()[itemIndex].pictureSrc
|
||||
if (!pictureSrc) return
|
||||
return props.onSubmit({
|
||||
@ -65,8 +64,7 @@ export const SinglePictureChoice = (props: Props) => {
|
||||
<For each={filteredItems()}>
|
||||
{(item, index) => (
|
||||
<button
|
||||
// eslint-disable-next-line solid/reactivity
|
||||
on:click={handleClick(index())}
|
||||
on:click={() => handleClick(index())}
|
||||
data-itemid={item.id}
|
||||
class={
|
||||
'flex flex-col typebot-picture-button focus:outline-none filter hover:brightness-90 active:brightness-75 justify-between ' +
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@typebot.io/nextjs",
|
||||
"version": "0.1.29",
|
||||
"version": "0.1.30",
|
||||
"description": "Convenient library to display typebots on your Next.js website",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@typebot.io/react",
|
||||
"version": "0.1.29",
|
||||
"version": "0.1.30",
|
||||
"description": "Convenient library to display typebots on your React app",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
Reference in New Issue
Block a user