AdrianMachado / KaiUI

React component library for KaiOS apps
MIT License
187 stars 39 forks source link

onInputChange not working #37

Open grachet opened 3 years ago

grachet commented 3 years ago

Hi,

Im using checkbox listitem and onInputChange is working only if you click on the checkbox (like with the mouse) If you press enter on your computer or center key on kaios, nothing is trigger (onFocusChange is also not triggered)

I've done that in CheckboxListItem.tsx

 const handleInvertCheck = () => {
    if (onInputChange) {
      onInputChange(!isChecked);
    }
    setChecked(wasChecked => !wasChecked);
  }

My code

<CheckboxListItem
                    primary={"title"}
                    initCheckboxVal={false}
                    checkboxSide="left"
                    onInputChange={(isChecked) => {
                            showToast("updated", 1000)
                    }}
                  />)
AdrianMachado commented 2 years ago

Hey, my ability to dedicate time to this project is very minimal so please submit a PR to fix any issues