Comparing version 2.0.0-alpha.7 to 2.0.0-alpha.8
{ | ||
"name": "clockvine", | ||
"version": "2.0.0-alpha.7", | ||
"version": "2.0.0-alpha.8", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "author": "Kevin Hamer [kh] <kevin@imarc.com>", |
@@ -21,4 +21,3 @@ import { defineStore } from 'pinia' | ||
indexDataField = 'data', | ||
indexMetaField = 'meta', | ||
showRequiresKey = true, | ||
showRequiresKey = true | ||
} = {} | ||
@@ -118,3 +117,3 @@ ) { | ||
const id = unref(idRef) | ||
if (showRequiresKey && id === undefined) { | ||
if (showRequiresKey && (id === undefined || id === null)) { | ||
return | ||
@@ -187,3 +186,3 @@ } | ||
return new Proxy({}, { | ||
get (target, prop, receiver) { | ||
get (_, prop) { | ||
return computed(() => { | ||
@@ -227,3 +226,3 @@ const params = nestedUnref(paramsRef) | ||
const destroy = async (element, params = {}) => { | ||
const deletedElement = await api.destroy(nestedUnref(element), params) | ||
await api.destroy(nestedUnref(element), params) | ||
invalidateAllIndexes() | ||
@@ -234,2 +233,12 @@ return deleteElement(element) | ||
return { | ||
/** | ||
* These are primarilary included so that pinia dev tools work; without | ||
* these being returned, these reactive objects will not show in the dev | ||
* tools. | ||
*/ | ||
elements, | ||
elementState, | ||
indexes, | ||
indexState, | ||
destroy, | ||
@@ -243,5 +252,5 @@ index, | ||
store, | ||
update, | ||
update | ||
} | ||
}) | ||
} |
25246
646