Pārlūkot izejas kodu

Table: fix pages calculation

master
Bing Sun pirms 5 gadiem
vecāks
revīzija
c2159cc65c
Parakstījis: sunb GPG atslēgas ID: F7795F8C590626AB
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. +1
    -1
      src/components/Table.js

+ 1
- 1
src/components/Table.js Parādīt failu

@@ -30,7 +30,7 @@ export default initial_vnode => {
if (limit > 0 && limit < Infinity && model.cache().count) {
let active_page = offset / limit

pages = Array.from(Array(Math.floor(model.cache().count / limit) + 1))
pages = Array.from(Array(Math.ceil(model.cache().count / limit)))
.map((_,i) => active_page == i ? {active: true} : {active: false})

if (pages.length <= 10) {


Notiek ielāde…
Atcelt
Saglabāt