@carbonorm/carbonreact 3.5.1 → 3.5.2

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbonorm/carbonreact",
3
3
  "license": "MIT",
4
- "version": "3.5.1",
4
+ "version": "3.5.2",
5
5
  "browser": "dist/index.umd.js",
6
6
  "module": "dist/index.esm.js",
7
7
  "main": "dist/index.cjs.js",
@@ -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
- console.log('element', element, REQUEST_PRIMARY_KEY[element], row[element])
155
- if (REQUEST_PRIMARY_KEY[element] !== row[element]) {
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[column], row[column])
160
+
161
+ if (REQUEST_PRIMARY_KEY[column] !== 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)