Comments (4)
Thanks :))
helped me a lot
from react-navigation-collapsible.
hi @aminsaedi It doesn't change according to the change from your state?
from react-navigation-collapsible.
No its remain the initial value of the state after changing that.
I put there lines of code in my screen
` const options = {
navigationOptions: {
/* Add a custom header to 'useCollapsibleHeader' options the same way you would add it to the Stack.Screen options */
header: ({ scene, previous, navigation }) => {
const { options } = scene.descriptor;
const title =
options.headerTitle !== undefined
? options.headerTitle
: options.title !== undefined
? options.title
: scene.route.name;
return (
<View
style={{
width: "100%",
height: 200,
backgroundColor: "blue",
padding: 20,
}}
>
<View
style={{
flex: 1,
backgroundColor: "gray",
alignItems: "center",
justifyContent: "center",
}}
>
<Text
style={{
fontSize: 32,
color: "white",
marginBottom: 10,
}}
>
{activeSortMethod.name}
</Text>
{previous && (
<TouchableOpacity onPress={() => setShowSortByModal(true)}>
<View>
<Text
style={{
fontSize: 16,
fontWeight: "bold",
color: "white",
}}
>{"<< GO BACK"}</Text>
</View>
</TouchableOpacity>
)}
</View>
</View>
);
},
},
};
const {
onScroll /* Event handler /,
containerPaddingTop / number /,
scrollIndicatorInsetTop / number */,
} = useCollapsibleHeader(options);
`
I'm sure that i chage state correctly.but it's not seems to work
from react-navigation-collapsible.
You can use navigation.setParams({ myTitle: 'aaaaa' });
and render scene.route.params.myTitle
.
This will re-render your new param.
from react-navigation-collapsible.
Related Issues (20)
- Example doesn't run. Error "Couldn't find a route object"
- Support with react-native-maps HOT 6
- Headerbar does not rerender after changing options HOT 1
- Can we have animation when calling showHeader ? HOT 1
- Can we collapsible header for tabs ? HOT 3
- Error when installing newest version HOT 3
- SubHeader will move up after pulling down. HOT 1
- TypeError: undefined is not an object (evaluating 'this._callListeners.bind') HOT 1
- React Navigation 6.x Support HOT 1
- v6.0.0 default project broken HOT 1
- Transparent header HOT 1
- Can a header enlarge itself HOT 1
- Collapse as soon as scrolling starts HOT 2
- Possible to use collapsible subheader with collapsible header? HOT 1
- containerPaddingTop is not working properly for expo project, with temporary fix HOT 1
- Project is using deprecated .expo.* file extensions HOT 3
- Why header appear when scroll reachs bottom of current view ? HOT 1
- Error on require react-native-iphone-x-helper "undefined is not an object"
- Inconsistency between ios and Android
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-navigation-collapsible.