Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49260

Using callback in ref attribute breaks IonInput

$
0
0

Other attributes of IonInput are ignored when I set callback to ref. But it works fine with simple html input

  const callback = useCallback((elem) => {
    console.dir(elem);
  }, []);

....
          <IonInput 
            className="asdasd" // <-- className ignored
            onIonChange={(e) => setText(e.detail.value)} // <-- this callback ignored too
            ref={callback} // <-- If remove this line ion-input will start work fine
          />

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>