@@ -78,7 +78,7 @@ angular.module('ui.scroll', [])
78
78
const bufferSize = Math . max ( BUFFER_MIN , parseNumericAttr ( $attr . bufferSize , BUFFER_DEFAULT ) ) ;
79
79
const padding = Math . max ( PADDING_MIN , parseNumericAttr ( $attr . padding , PADDING_DEFAULT ) ) ;
80
80
let startIndex = parseNumericAttr ( $attr . startIndex , 1 ) ;
81
- let ridActual = 0 ; // current data revision id
81
+ let ridActual = 0 ; // current data revision id
82
82
let pending = [ ] ;
83
83
84
84
const elementRoutines = new ElementRoutines ( $injector , $q ) ;
@@ -109,7 +109,7 @@ angular.module('ui.scroll', [])
109
109
function persistDatasourceIndex ( datasource , propName ) {
110
110
let getter ;
111
111
// need to postpone min/maxIndexUser processing if the view is empty
112
- if ( datasource . hasOwnProperty ( propName ) && ! buffer . length ) {
112
+ if ( Number . isInteger ( datasource [ propName ] ) ) {
113
113
getter = datasource [ propName ] ;
114
114
if ( Number . isInteger ( getter ) ) {
115
115
onRenderHandlers . push ( ( ) => datasource [ propName ] = getter ) ;
@@ -127,6 +127,10 @@ angular.module('ui.scroll', [])
127
127
Object . defineProperty ( datasource , propName , {
128
128
set : ( value ) => {
129
129
getter = value ;
130
+ if ( pending . length && ! buffer . length ) {
131
+ persistDatasourceIndex ( datasource , propName ) ;
132
+ return ;
133
+ }
130
134
buffer [ propUserName ] = value ;
131
135
const topPaddingHeightOld = viewport . topDataPos ( ) ;
132
136
viewport . adjustPaddings ( ) ;
0 commit comments