Props not being sent to ActionButtonItem
See original GitHub issueAfter I pressed the main button, I get a message saying that this.props.anim.interpolate is undefined. After taking a look at the code, I have managed to realize the ActionButtonItem anim props was not set.
It seems like this section of code is not working (inside _renderActions):
{actionButtons.map((ActionButton, idx) => (
<ActionButtonItem
key={idx}
anim={this.anim}
{...this.props}
{...ActionButton.props}
parentSize={this.props.size}
btnColor={this.props.btnOutRange}
onPress={() => {
if (this.props.autoInactive){
this.timeout = setTimeout(this.reset.bind(this), 200);
}
ActionButton.props.onPress();
}}
/>
))}
A log of the ActionButtonItem props shows this:
{ buttonColor: '#9b59b6',
title: 'New Task',
onPress: [Function: onPress],
active: true,
spaceBetween: 15,
useNativeFeedback: true,
activeOpacity: 0.85 }
Which are only the default values.
I cannot possibly find where this issue could be coming from. The props are OK before that map function but the do not appear on the Item itself.
This is Android 5, react native 0.44 and react 0.16-alpha6.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:12 (3 by maintainers)
Top Results From Across the Web
ReactJS props aren't being passed to other component when ...
This navigation works, however no props are passed (like authMode & username) and the props are always "undefined" in the target/new component, ...
Read more >react-native-action-button - Bountysource
I wanted to prevent the default behaviour of opening the menu when onPress is triggered (when child items are present) but it seems...
Read more >invariant violation viewproptypes has been removed - You.com
Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'. ERROR Invariant Violation: Module AppRegistry is not a registered callable ...
Read more >How passing props to component works in React
Props stands for “properties,” and they are used in a React application to send data from one React component to another React component....
Read more >react-native-action-button: Docs, Community, Tutorials
○2.8.5 (see all)○License:MIT○TypeScript:Not Found○ ... Getting Started with Styled Components | Social Media App UI using Styled ... prop-types ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I also have the bug, I don’t understand why this issue is closed…
Well, since the ActionItem have a Title, then I guess one use case is to show only text and no icon or label. It was actually what I was trying to do as I didn’t need an icon.
Still the library shouldn’t crash if the Item has no children.