Could you please help me recognize what I am doing wrong here?
I am trying to enable the infinite scroll with data loading in chunks.
Infinite scroll do work but I am unable to fetch more data.
Attaching the attachment of my LWC js for your reference.
Could you please re-phrase these 2 points? It's not clear what did you mean in "UserAction event is not getting in listeners", and "then scrollToDate is not defined.".
scrollTo : {
label : 'Scroll to date',
inputWidth : '7em',
width : 'auto',
type : 'datefield',
value : this.startDate,
format : 'DD/MM/YYYY',
disabled : true,
step : '1d',
listeners : {
change({userAction, value }) {
if (userAction) {
console.log(value);
bryntum.scheduler.scrollToDate(bryntum.scheduler.DateHelper.set(value, 'hour', 12), { block : 'center', animate : 500 });
}
}
},
So, It is not coming inside the userAction block.
If I am only capturing the change event on the basis of value change then it is going inside the block but scrollToDate is not defined error is getting popped up.
I tried to apply this code in our SalesForce example and I see userAction is defined and has valid value when I change value of that picker.
Btw, I am not sure what is bryntum.scheduler.scrollToDate? Did you try to call the method on scheduler instance or on scheduler class?
Please try it with our examples code, apply required changes to reproduce the problem you faced and post the code here, so we will be able to help you.
Can we connect over a call?
As of now on the scrollToDate function, I am getting the error - Date.getTime() is not defined.
Also, I am not using this Date.getTime() anywhere in my function.
items : {
scrollTo : {
label : 'Scroll to date',
inputWidth : '7em',
width : 'auto',
type : 'datefield',
value : this.startDate,
format : 'DD/MM/YYYY',
//disabled : true,
step : '1d',
listeners : {
change({userAction, value }) {
if (userAction) {
console.log(value);
scheduler.scrollToDate(bryntum.scheduler.DateHelper.format(value, 'hour',12), { block : 'center', animate : 500 });
}
}
},
highlightExternalChange : false
},