We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95d9c88 commit 5cad46dCopy full SHA for 5cad46d
bundle/Resources/public/admin/js/multientry.js
@@ -64,7 +64,7 @@ class MultiEntry {
64
}
65
66
next_id() {
67
- const timestamp = new Date();
+ const timestamp = +new Date();
68
69
return `${timestamp}${this.id++}`;
70
@@ -86,6 +86,9 @@ class MultiEntry {
86
setup_dom() {
87
this.$element.querySelectorAll(SELECTORS.item).forEach(($item) => {
88
$item.append(MultiEntry.create_element_from_string(this.remove_button_template));
89
+ $item.querySelector(SELECTORS.remove_button).addEventListener('click', () => {
90
+ this.remove($item);
91
+ });
92
});
93
94
0 commit comments