Revisions on grid page to make parameters easier to grok
This commit is contained in:
@@ -623,14 +623,16 @@
|
||||
|
||||
(defn apply-pagination-raw [args results]
|
||||
{:entries (->> results
|
||||
(drop (:start args 0))
|
||||
(take (:count args (or (:per-page args) default-pagination-size))))
|
||||
(drop (or (:start args) 0))
|
||||
(take (or (:count args) (:per-page args) default-pagination-size)))
|
||||
:count (count results)})
|
||||
|
||||
(defn apply-pagination [args results]
|
||||
{:ids (->> results
|
||||
(drop (:start args 0))
|
||||
(take (:count args (or (:per-page args) default-pagination-size)))
|
||||
(drop (or (:start args) 0))
|
||||
(take (or (:count args )
|
||||
(:per-page args)
|
||||
default-pagination-size))
|
||||
(map last))
|
||||
:count (count results)})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user