@carbonorm/carbonreact 3.5.0 → 3.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -151,6 +151,7 @@ export function initiateWebsocket({
|
|
|
151
151
|
|
|
152
152
|
const elementsToUpdate = currentCache.filter((row: any) => {
|
|
153
153
|
for (const element of primaryKeyKeys) {
|
|
154
|
+
console.log('element', element, REQUEST_PRIMARY_KEY[element], row[element])
|
|
154
155
|
if (REQUEST_PRIMARY_KEY[element] !== row[element]) {
|
|
155
156
|
return false
|
|
156
157
|
}
|
|
@@ -158,6 +159,12 @@ export function initiateWebsocket({
|
|
|
158
159
|
return true
|
|
159
160
|
})
|
|
160
161
|
|
|
162
|
+
console.log('elementsToUpdate', elementsToUpdate)
|
|
163
|
+
|
|
164
|
+
if (elementsToUpdate.length === 0) {
|
|
165
|
+
console.error('Could not find any elements to update in the cache.', elementsToUpdate, primaryKeyKeys, REQUEST_PRIMARY_KEY, currentCache)
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
161
168
|
|
|
162
169
|
const updatedElements = elementsToUpdate.map((row: any) => {
|
|
163
170
|
return {
|
|
@@ -166,6 +173,8 @@ export function initiateWebsocket({
|
|
|
166
173
|
}
|
|
167
174
|
})
|
|
168
175
|
|
|
176
|
+
console.log('updatedElements', updatedElements)
|
|
177
|
+
|
|
169
178
|
WsLiveUpdates[TABLE_NAME_SHORT][METHOD]({}, updatedElements)
|
|
170
179
|
|
|
171
180
|
}
|