fix(VirtualScroller): #7208
pull/7210/head
Tuğçe Küçükoğlu 2025-02-06 16:14:12 +03:00 committed by GitHub
commit df90418496
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -430,9 +430,12 @@ export default {
return _currentIndex <= _numT ? _numT : _isScrollDownOrRight ? _last - _num - _numT : _first + _numT - 1;
};
const calculateFirst = (_currentIndex, _triggerIndex, _first, _last, _num, _numT, _isScrollDownOrRight) => {
const calculateFirst = (_currentIndex, _triggerIndex, _first, _last, _num, _numT, _isScrollDownOrRight, _isCols) => {
if (_currentIndex <= _numT) return 0;
else return Math.max(0, _isScrollDownOrRight ? (_currentIndex < _triggerIndex ? _first : _currentIndex - _numT) : _currentIndex > _triggerIndex ? _first : _currentIndex - 2 * _numT);
const firstValue = Math.max(0, _isScrollDownOrRight ? (_currentIndex < _triggerIndex ? _first : _currentIndex - _numT) : _currentIndex > _triggerIndex ? _first : _currentIndex - 2 * _numT);
const maxFirst = this.getLast(firstValue, _isCols)
if (firstValue > maxFirst) return maxFirst - _num;
else return firstValue
};
const calculateLast = (_currentIndex, _first, _last, _num, _numT, _isCols) => {