mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
Refactored query parameters.
This commit is contained in:
parent
69962eb08d
commit
89781d4847
99 changed files with 452 additions and 2273 deletions
|
|
@ -54,9 +54,12 @@ export default function MetricsTable({
|
|||
|
||||
const filteredData = useMemo(() => {
|
||||
if (data) {
|
||||
const items = percentFilter(dataFilter ? dataFilter(data, filterOptions) : data);
|
||||
let items = percentFilter(dataFilter ? dataFilter(data, filterOptions) : data);
|
||||
if (limit) {
|
||||
return items.filter((e, i) => i < limit).sort(firstBy('y', -1).thenBy('x'));
|
||||
items = items.filter((e, i) => i < limit);
|
||||
}
|
||||
if (filterOptions?.sort === false) {
|
||||
return items;
|
||||
}
|
||||
return items.sort(firstBy('y', -1).thenBy('x'));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue