Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scene props are not changing when pressing onRight and calling Actions.refresh() #2514

Closed
manoelbo opened this issue Oct 16, 2017 · 2 comments

Comments

@manoelbo
Copy link

manoelbo commented Oct 16, 2017

Version

  • react-native-router-flux 4.0.0-beta.22
  • react-native v0.49.3

Expected behaviour

I expected to change my scene props pressing onRight and calling Actions.refresh()

const RouterComponent = () => {
	return (
		<Router sceneStyle={{ backgroundColor: '#fff' }}>
			<Modal>
				<Scene tabs key="login" component={LoginForm} title="Login" />
				<Scene 
					tabs 
					key="clientList" 
					component={ClientList} 
					title="Clientes" 
					initial 
					/* renderRightButton={<SearchIcon onPress={() => this.onRigthButton.bind(this)} />} */
					navigationBarStyle={styles.navBarStyle}
					titleStyle={styles.titleStyle}
					navBarButtonColor={'#ffff'}
					rightButtonImage={require('./img/ic_search.png')}
					isSearchOpen={false}
					onRight={() => Actions.clientList({ type: ActionConst.REFRESH, hideNavBar: false })}
				/>
			</Modal>
		</Router>
	);
};

Actual behaviour

onRight={() => Actions.clientList({ type: ActionConst.REFRESH, hideNavBar: false })}

or

onRight={() => Actions.refresh({ hideNavBar: false })}

Both doesn't change my props and doesn't re-render my component.

@manoelbo manoelbo changed the title Scene props not changing on pressing onRight and calling Actions.refresh() Scene props are not changing on pressing onRight and calling Actions.refresh() Oct 16, 2017
@manoelbo manoelbo changed the title Scene props are not changing on pressing onRight and calling Actions.refresh() Scene props are not changing when pressing onRight and calling Actions.refresh() Oct 16, 2017
@aksonov
Copy link
Owner

aksonov commented Oct 17, 2017

hideNavBar dynamic changing is not yet supported, see #2492

@aksonov aksonov closed this as completed Oct 17, 2017
@kallayyash
Copy link

navBarButtonColor={'#96c41c'} use this image button color

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants