Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Commit

Permalink
trigger a change when icon is removed
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cherbst committed Jan 13, 2021
1 parent c2edd03 commit 0832b62
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions assets/js/input.js
Original file line number Diff line number Diff line change
@@ -189,6 +189,8 @@
.find('.acf-icon-picker__svg')
.html('<span class="acf-icon-picker__svg--span">+</span>');

jQuery('.acf-icon-picker__img input').trigger('change');

parent
.find('.acf-icon-picker__remove')
.removeClass('acf-icon-picker__remove--active');

0 comments on commit 0832b62

Please # to comment.