@carbonorm/carbonreact 3.5.1 → 3.5.3
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
|
@@ -150,13 +150,24 @@ export function initiateWebsocket({
|
|
|
150
150
|
const primaryKeyKeys = Object.keys(REQUEST_PRIMARY_KEY)
|
|
151
151
|
|
|
152
152
|
const elementsToUpdate = currentCache.filter((row: any) => {
|
|
153
|
+
|
|
153
154
|
for (const element of primaryKeyKeys) {
|
|
154
|
-
|
|
155
|
-
|
|
155
|
+
|
|
156
|
+
// remove the table name from the column name
|
|
157
|
+
const column = element.split('.')[1]
|
|
158
|
+
|
|
159
|
+
console.log('column', column, REQUEST_PRIMARY_KEY[element], row[column])
|
|
160
|
+
|
|
161
|
+
if (REQUEST_PRIMARY_KEY[element] !== row[column]) {
|
|
162
|
+
|
|
156
163
|
return false
|
|
164
|
+
|
|
157
165
|
}
|
|
166
|
+
|
|
158
167
|
}
|
|
168
|
+
|
|
159
169
|
return true
|
|
170
|
+
|
|
160
171
|
})
|
|
161
172
|
|
|
162
173
|
console.log('elementsToUpdate', elementsToUpdate)
|
|
@@ -167,10 +178,12 @@ export function initiateWebsocket({
|
|
|
167
178
|
}
|
|
168
179
|
|
|
169
180
|
const updatedElements = elementsToUpdate.map((row: any) => {
|
|
181
|
+
|
|
170
182
|
return {
|
|
171
183
|
...row,
|
|
172
184
|
...REQUEST
|
|
173
185
|
}
|
|
186
|
+
|
|
174
187
|
})
|
|
175
188
|
|
|
176
189
|
console.log('updatedElements', updatedElements)
|