File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -144,9 +144,11 @@ export default {
144144 items () {
145145 const statusObject = this .itemElements .itemObject
146146 const { columns } = this .itemElements
147+ const connectionKeyName = this .itemElements .connectionKeyName || ' id'
148+ const dictionaryKeyName = this .itemElements .dictionaryKeyName || ' id'
147149 const items = this .itemElements .data .map ((item ) => {
148150 const rItem = {}
149- rItem .id = item . id
151+ rItem .id = item[dictionaryKeyName]
150152 for (const column of columns) {
151153 const prop = column .obj .split (' .' ).reduce ((object , property ) => object[property] || ' ' , item)
152154 rItem[column .name ] = prop
@@ -155,7 +157,7 @@ export default {
155157 if (item[statusObject].length > 0 ) {
156158 rItem .added = ' <span hidden>1</span>Tak'
157159 rItem .filterStatus = 1
158- rItem .connectionId = item[statusObject][0 ]. id
160+ rItem .connectionId = item[statusObject][0 ][connectionKeyName]
159161 } else {
160162 rItem .added = ' <span hidden>0</span>Nie'
161163 rItem .filterStatus = 0
Original file line number Diff line number Diff line change @@ -92,6 +92,8 @@ const mutations = {
9292 state . itemElements . itemObject = obj . itemObject
9393 state . itemElements . primaryId = obj . primaryId
9494 state . itemElements . foreignId = obj . foreignId
95+ state . itemElements . connectionKeyName = obj . connectionKeyName
96+ state . itemElements . dictionaryKeyName = obj . dictionaryKeyName
9597 state . itemElements . show = true
9698 } ,
9799 openImageContainer ( state , item ) {
You can’t perform that action at this time.
0 commit comments