Ticket 734: reset grabbed on component load instead of loadMedias action (prevent selection reset on inifinite load)

This commit is contained in:
Jérémy Munsch 2022-03-28 10:18:48 +02:00
parent 9af98e3225
commit e78c901d21
No known key found for this signature in database
GPG key ID: 55196BEE445F6049

View file

@ -111,6 +111,11 @@
init() {
this.offset = 0;
this.resetInfiniteScroll();
// * Reset selected on component load
this.$store.commit({
type: 'updateGrabbed',
grabbed: []
});
this.loadMedias(this.$store.state);
//set dateSorted
this.dateSorted = false;
@ -132,10 +137,6 @@
}
},
loadMedias($state) {
this.$store.commit({
type: 'updateGrabbed',
grabbed: []
});
if (this.offset === 0){
this.medias = [];
this.loader = true;