From 0832b62a4dbfa459b647840159291a69bd39df47 Mon Sep 17 00:00:00 2001 From: Christoph Herbst Date: Wed, 13 Jan 2021 14:00:29 +0100 Subject: [PATCH] trigger a change when icon is removed this is quivalent to changing the icon on line 19. Without it, when using the field in a gutenberg block, just removing the icon is not reflected in the block preview and does not get saved when saving the post containing the block. --- assets/js/input.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/assets/js/input.js b/assets/js/input.js index f573786..3f7eb68 100755 --- a/assets/js/input.js +++ b/assets/js/input.js @@ -189,6 +189,8 @@ .find('.acf-icon-picker__svg') .html('+'); + jQuery('.acf-icon-picker__img input').trigger('change'); + parent .find('.acf-icon-picker__remove') .removeClass('acf-icon-picker__remove--active');