File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,14 @@ docs = unit # make (createComponent "PaginationExample")
37
37
, details = Just $ R .text " 40 results"
38
38
}
39
39
40
+ , example
41
+ $ pagination defaults
42
+ { currentPage = self.state.currentPage
43
+ , pages = 0
44
+ , onChange = self.setState <<< flip _{ currentPage = _ }
45
+ , details = Just $ R .text " 0 results"
46
+ }
47
+
40
48
, example
41
49
$ pagination defaults
42
50
{ currentPage = self.state.currentPage
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ pagination = makeStateless (createComponent "Pagination") render
36
36
let
37
37
boundedPage = clamp 0 (props.pages - 1 ) props.currentPage
38
38
rangeMin = max 0 (boundedPage - (props.focusWindow / 2 ))
39
- rangeMax = min (props.pages - 1 ) (boundedPage + (props.focusWindow / 2 ))
39
+ rangeMax = max 0 $ min (props.pages - 1 ) (boundedPage + (props.focusWindow / 2 ))
40
40
41
41
prevButton =
42
42
keyed " prev" $ R .li_
You can’t perform that action at this time.
0 commit comments