This issue appeared when I tried to insert a mask on the "Input" component, which was accomplished by the use of a Higher Order Component.
This, on the other hand, changed the type of the Input to the "MaskedInput", which was the HOC type and by doing so, the floating label item stopped to recognize the "inputProps" and to pass them through to the Input child.
Higher Order Components wrapping "Input" components should work inside the "Item" component using the "floatinglabel" prop (or whatever other props, tbh).
Actual behaviour
The "Item" component does not recognize the input props because the type of the component is no more "Input", but the HOC type.
Steps to reproduce (code snippet or screenshot)
HOC Snippet (just adding a console.log to the "onChangeText" method)
This issue appeared when I tried to insert a mask on the "Input" component, which was accomplished by the use of a Higher Order Component. This, on the other hand, changed the type of the Input to the "MaskedInput", which was the HOC type and by doing so, the floating label item stopped to recognize the "inputProps" and to pass them through to the Input child.
react-native, react and native-base version
React 16.0.0, React-Native 0.51.0, Native-Base 2.5.1
Expected behaviour
Higher Order Components wrapping "Input" components should work inside the "Item" component using the "floatinglabel" prop (or whatever other props, tbh).
Actual behaviour
The "Item" component does not recognize the input props because the type of the component is no more "Input", but the HOC type.
Steps to reproduce (code snippet or screenshot)
HOC Snippet (just adding a console.log to the "onChangeText" method)
Example Page Snippet (using the HOC inside an Item Component)
Screenshot of emulator/device
Is the bug present in both ios and android or in any one of them?
Any of the platforms.
Any other additional info which would help us debug the issue quicker.
I filed a PR detailing the issue and proposing a solution (basically changing the assertion method to use the "displayName" prop instead of type.