Module
Solid.Router.Search
- Package
- purescript-purs-solid
- Repository
- arazorda/purs-solid
Typed query params. A schema row declares each param as a Maybe or an
Array of String, Int or Boolean; values that don't parse read as
Nothing or are left out.
search <- useSearch @(page :: Maybe Int, tag :: Array String)
text (show <<< _.page <$> searchParams search)
setSearch search { page: Just 2 }
#setSearchWith Source
setSearchWith :: forall r given missing options optionsMissing. Union given missing r => Union options optionsMissing NavigateOptions => Record options -> Search r -> Record given -> Effect UnitTakes any subset of NavigateOptions.
#SearchValue Source
class SearchValue a whereMembers
parseSearchValue :: String -> Maybe aprintSearchValue :: a -> String
Instances
#SearchField Source
class SearchField a whereA param can always be missing, so it's a Maybe (the first value) or an
Array (every value).
Members
readSearchField :: Array String -> awriteSearchField :: a -> Array String
Instances
(SearchValue a) => SearchField (Maybe a)(SearchValue a) => SearchField (Array a)(Fail (Beside (Text "A query param can be missing, so make it a Maybe or an Array, not ") (Quote a))) => SearchField a
#SearchFields Source
class SearchFields :: RowList Type -> Constraintclass SearchFields rl where
Members
searchFields :: Proxy rl -> Array SearchFieldCodec
Instances
SearchFields Nil(IsSymbol name, SearchField a, SearchFields rest) => SearchFields (Cons name a rest)
#SearchFieldCodec Source
type SearchFieldCodec = { name :: String, read :: Array String -> SearchFieldValue, write :: SearchFieldValue -> Array String }#SearchFieldValue Source
data SearchFieldValue- Modules
- Solid.
Action - Solid.
Async - Solid.
Component - Solid.
Component. JS - Solid.
Context - Solid.
Control - Solid.
DOM - Solid.
DOM. Aria - Solid.
DOM. AttrValue - Solid.
DOM. HTML - Solid.
DOM. SVG - Solid.
Errors - Solid.
Internal. Action - Solid.
Internal. Equality - Solid.
Internal. Identity - Solid.
Internal. Names - Solid.
Internal. Optimistic - Solid.
Internal. Props - Solid.
Internal. Reply - Solid.
Internal. Serializable - Solid.
Internal. ServerFunction - Solid.
Internal. Setup - Solid.
Internal. Store - Solid.
Internal. Tracked - Solid.
Internal. View - Solid.
JSX - Solid.
Lifecycle - Solid.
Meta - Solid.
Owner - Solid.
Reactivity - Solid.
Root - Solid.
Router - Solid.
Router. Action - Solid.
Router. Path - Solid.
Router. Query - Solid.
Router. Search - Solid.
Setup - Solid.
Signal - Solid.
Start. Middleware - Solid.
Start. RequestEvent - Solid.
Start. Response - Solid.
Start. ServerFunction - Solid.
Start. UseServer - Solid.
Store - Solid.
Testing - Solid.
Utility - Solid.
Web - Solid.
Web. SSR