Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ihp/IHP/Pagination/ViewFunctions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ renderFilter :: (?context::ControllerContext) =>
-> Html
renderFilter placeholder =
[hsx|
<form method="GET" action="" class="mt-2 float-right">
<form method="GET" action={formAction} class="mt-2 float-right">
<div class="form-row">
<div class="col-auto">
<label class="sr-only" for="inlineFormInput">Name</label>
Expand All @@ -156,10 +156,11 @@ renderFilter placeholder =
</form>
|]
where
path = Wai.rawPathInfo theRequest
formAction = path
boxValue = fromMaybe "" (paramOrNothing "filter") :: Text
clearFilterUrl = path <> Query.renderQuery True newQueryString
where
path = Wai.rawPathInfo theRequest
queryString = Wai.queryString theRequest
newQueryString = queryString
|> removeQueryItem "filter"
Expand Down