swushi / react-native-input-outline

MIT License
123 stars 15 forks source link

On focus doesn't fire any events #22

Closed sbjesushenao closed 2 years ago

sbjesushenao commented 2 years ago

Just implementing the example and it doesn't work.

import React, { useRef, useState } from 'react';
import { View, Button } from 'react-native';
import { InputOutline } from 'react-native-input-outline';

export default () => {
  const inputRef = useRef <InputOutline> null;

  return (
    <View>
      <InputOutline
        ref={inputRef}
        onFocus={() => console.log('focused')}
      />
    </View>
  );
};
swushi commented 2 years ago

You didn't pass all of the required props. All of the underlying props that you would normally pass to a TextInput also needs to be passed.