Please refer to codesandbox
UPDATE: This happens on ListInput with calendar as well: Calendar opens a sheet and the error then show there as well.
After sheet is opened and one resizes the window the following error occurs:
sheet.setSwipeStep is not a function
So I looked into the code and the following is happening:
sheet.on('close', () => {
currentBreakpointIndex = undefined;
if (sheet.params.swipeToStep || useBreakpoints) {
$el.removeClass('modal-in-swipe-step modal-in-breakpoint');
sheet.emit('local::_swipeStep', false);
app.off('resize', onResize);
}
...
}
It only clears the onResize event when the following is set:
sheet.params.swipeToStep || useBreakpoints
However, it sets the event with this code:
sheet.on('open', () => {
if (sheet.params.closeOnEscape) {
$(document).on('keydown', onKeyDown);
}
$el.prevAll('.popup.modal-in').addClass('popup-behind');
app.on('resize', onResize);
...
}
Hence it always sets it but when it removes it it only does for a specific use case. The on open code must look like this:
sheet.on('open', () => {
if (sheet.params.closeOnEscape) {
$(document).on('keydown', onKeyDown);
}
$el.prevAll('.popup.modal-in').addClass('popup-behind');
if (sheet.params.swipeToStep || useBreakpoints) {
app.on('resize', onResize); // <= Need to add resize with same conditions as used by the off code
}
...
}