File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { getCollectionsAPI } from "../../api/requests";
5
5
import { app } from "../../app" ;
6
6
import { updateImgPreview } from "../../elements/addDataElement" ;
7
7
import { DRAGGABLE_GROUP_NAME } from "../../constants/constants" ;
8
+ import { mapState } from "vuex" ;
8
9
9
10
const Collections = Vue . component ( "Collections" , {
10
11
data ( ) {
@@ -23,7 +24,8 @@ const Collections = Vue.component("Collections", {
23
24
group : DRAGGABLE_GROUP_NAME ,
24
25
ghostClass : "ghost"
25
26
} ;
26
- }
27
+ } ,
28
+ ...mapState ( "Interface" , [ "elements" ] )
27
29
} ,
28
30
watch : {
29
31
// id(newValue) {
@@ -39,7 +41,7 @@ const Collections = Vue.component("Collections", {
39
41
40
42
// if doesnt exist in obj, add it
41
43
if ( ! ( boxId in this . files ) ) {
42
- const data = app . elementsData . find (
44
+ const data = this . elements . find (
43
45
( { boxId : thisBoxId } ) => thisBoxId == boxId
44
46
) . data ;
45
47
const definedData = data ? [ data [ 0 ] ] : [ ] ;
You can’t perform that action at this time.
0 commit comments