@carbonorm/carbonreact 3.5.2 → 3.5.4
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
|
@@ -115,7 +115,7 @@ export function initiateWebsocket({
|
|
|
115
115
|
|
|
116
116
|
const METHOD: string = parsedData?.REST?.METHOD;
|
|
117
117
|
|
|
118
|
-
const REQUEST: { [key:string]: any } = parsedData?.REST?.REQUEST;
|
|
118
|
+
const REQUEST: { [key: string]: any } = parsedData?.REST?.REQUEST;
|
|
119
119
|
|
|
120
120
|
const REQUEST_PRIMARY_KEY: {
|
|
121
121
|
[key: string]: string
|
|
@@ -156,9 +156,9 @@ export function initiateWebsocket({
|
|
|
156
156
|
// remove the table name from the column name
|
|
157
157
|
const column = element.split('.')[1]
|
|
158
158
|
|
|
159
|
-
console.log('column', column, REQUEST_PRIMARY_KEY[
|
|
159
|
+
console.log('column', column, REQUEST_PRIMARY_KEY[element], row[column])
|
|
160
160
|
|
|
161
|
-
if (REQUEST_PRIMARY_KEY[
|
|
161
|
+
if (REQUEST_PRIMARY_KEY[element] !== row[column]) {
|
|
162
162
|
|
|
163
163
|
return false
|
|
164
164
|
|
|
@@ -178,15 +178,17 @@ export function initiateWebsocket({
|
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
const updatedElements = elementsToUpdate.map((row: any) => {
|
|
181
|
+
|
|
181
182
|
return {
|
|
182
183
|
...row,
|
|
183
184
|
...REQUEST
|
|
184
185
|
}
|
|
185
|
-
})
|
|
186
186
|
|
|
187
|
-
|
|
187
|
+
})
|
|
188
188
|
|
|
189
|
-
|
|
189
|
+
updatedElements.forEach((row: any) => {
|
|
190
|
+
WsLiveUpdates[TABLE_NAME_SHORT][METHOD]({}, row)
|
|
191
|
+
})
|
|
190
192
|
|
|
191
193
|
}
|
|
192
194
|
|