mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-05-09 17:04:43 +08:00
fix: allow passing partial params to setParams (#177)
Since params get merged, no need to send them all I think :)
This commit is contained in:
committed by
Satyajit Sahoo
parent
cb426d06de
commit
c3e9e4578e
@@ -371,7 +371,7 @@ export type NavigationHelpers<
|
||||
* @param params Params object for the current route.
|
||||
*/
|
||||
setParams<RouteName extends keyof ParamList>(
|
||||
params: ParamList[RouteName]
|
||||
params: Partial<ParamList[RouteName]>
|
||||
): void;
|
||||
};
|
||||
|
||||
@@ -409,7 +409,7 @@ export type NavigationProp<
|
||||
*
|
||||
* @param params Params object for the current route.
|
||||
*/
|
||||
setParams(params: ParamList[RouteName]): void;
|
||||
setParams(params: Partial<ParamList[RouteName]>): void;
|
||||
|
||||
/**
|
||||
* Update the options for the route.
|
||||
|
||||
Reference in New Issue
Block a user