From 5bad049c9dbfc500037a78bf369616e5e9345058 Mon Sep 17 00:00:00 2001 From: Songlin Jiang Date: Thu, 13 Jun 2024 10:18:11 +0300 Subject: [PATCH] Avoid updating the field again for the event source block Resolves #58 Signed-off-by: Songlin Jiang --- src/multiselect.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/multiselect.js b/src/multiselect.js index 8235029..8db571e 100644 --- a/src/multiselect.js +++ b/src/multiselect.js @@ -256,6 +256,9 @@ export class Multiselect { // Update the fields to the same value for // the selected blocks with same type. this.blockSelection_.forEach((id) => { + if (id === e.blockId) { + return; + } const block = this.workspace_.getBlockById(id); if (block.type === blockType) { block.setFieldValue(e.newValue, e.name);