Bläddra i källkod

[merge from 6.7] #7607 Make Table scroll to the very bottom when needed

svn changeset:23242/svn branch:6.8
tags/7.0.0.alpha2
Automerge 12 år sedan
förälder
incheckning
608bac4d2d
1 ändrade filer med 7 tillägg och 3 borttagningar
  1. 7
    3
      src/com/vaadin/ui/Table.java

+ 7
- 3
src/com/vaadin/ui/Table.java Visa fil

} }


if (index > maxIndex) { if (index > maxIndex) {
setCurrentPageFirstItemIndex(maxIndex);
// Note that we pass index, not maxIndex, letting
// setCurrentPageFirstItemIndex handle the situation.
setCurrentPageFirstItemIndex(index);
return; return;
} }


maxIndex = 0; maxIndex = 0;
} }


// Ensures that the new value is valid
// Assume that we want to scroll to the very bottom (so that the bottom
// row is completely visible even if (table height) / (row height) is
// not an integer.)
if (newIndex > maxIndex) { if (newIndex > maxIndex) {
newIndex = maxIndex;
newIndex = maxIndex + 1;
} }


// Refresh first item id // Refresh first item id

Laddar…
Avbryt
Spara