Class SearchParamsSetter
- Namespace
- Velvet
- Assembly
- Velvet.Docs.dll
The setter returned by UseSearchParams(). It accepts either the next params
directly or a functional updater (prev) => next, and defaults to a PUSH navigation (so Back
returns to the previous query) — pass Replace to overwrite the current
entry instead.
public sealed class SearchParamsSetter
- Inheritance
-
objectSearchParamsSetter
Remarks
Equivalent to React Router's setSearchParams(nextInit, navigateOptions) for users migrating from React Router.
Methods
- Invoke(Func<ISearchParams, ISearchParams>, NavigationMode)
Navigates to the current path with the query produced by applying
updaterto the CURRENT params — the functional form, for editing existing query state without rebuilding it by hand.
- Invoke(ISearchParams, NavigationMode)
Navigates to the current path with
nextas the query string.