abinavseelan / react-input-trigger

React component for handling character triggers inside textareas and input fields. 🐼
MIT License
88 stars 20 forks source link

Styling issues due to intermediate <div> #4

Closed abinavseelan closed 6 years ago

abinavseelan commented 6 years ago

Description

Currently the component renders the children input field(s) / textarea(s) by wrapping them in an intermediate <div> tag, which handles events.

This however introduced styling issues, especially with flex styles, since the intermediate <div> enforced block styling.

The fix for this was to pass on user styles, classnames and other information on to the component as props.

abinavseelan commented 6 years ago

This has been fixed in 7782ffdef21e6c717f72b32b8542253c50381d91.

You can now pass on any prop to the <InputTrigger> component. For example, style and className.

Upgrade to version 1.1.1 or greater to get the fix. 🎉😄