Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
BramKaashoek committed May 6, 2024
1 parent e0022eb commit 181105d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import 'react-loqate/dist/index.css';

You can either style the default input, list and listitem with their respective classes or replace them completely by passing in your own components in the components prop.

**Input and List components must be able to accept a ref, either through using forwardRef or being a base html element**
**Custom Input and List components must forward a ref!**

**All custom components must pass down their props!**

Expand All @@ -59,7 +59,7 @@ import AddressSearch from 'react-loqate';
<AddressSearch
// ...
components={{
Input: (props) => <input {...props} />,
Input: fowardRef((props, ref) => <input {...props} ref={ref} />),
List: forwardRef((props, ref) => {
const { className, ...rest } = props;
// ..
Expand Down

0 comments on commit 181105d

Please sign in to comment.