From a07d82310fb7c999f4674d3bee4136f476549451 Mon Sep 17 00:00:00 2001 From: NI Date: Tue, 22 Oct 2019 08:44:22 +0800 Subject: [PATCH] Manually update `knowns` record when it's been changed --- ui/home.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ui/home.vue b/ui/home.vue index b50f237..a08a2d5 100644 --- a/ui/home.vue +++ b/ui/home.vue @@ -356,6 +356,8 @@ export default { return; } + const self = this; + this.connector.connector = { id: connector.id(), name: connector.name(), @@ -366,7 +368,9 @@ export default { this.connector.historyRec, known.data, known.session, - () => {} + () => { + self.connector.knowns = self.connector.historyRec.all(); + } ) }; @@ -401,6 +405,8 @@ export default { return; } + const self = this; + this.connector.connector = { id: connector.id(), name: connector.name(), @@ -411,6 +417,8 @@ export default { this.connector.historyRec, ll.query, n => { + self.connector.knowns = self.connector.historyRec.all(); + done(n.data().success); } ) @@ -430,6 +438,8 @@ export default { }, removeKnown(uid) { this.connector.historyRec.del(uid); + + this.connector.knowns = this.connector.historyRec.all(); }, clearSessionKnown(uid) { this.connector.historyRec.clearSession(uid);