Add opening animation to ListChild

pull/6931/head
Karl Hobley 2021-01-26 14:42:59 +00:00 zatwierdzone przez Matt Westcott
rodzic e5dd68ed6d
commit 2738b21bf3
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -255,6 +255,7 @@ class ListChild {
this.index = index;
this.id = id;
const animate = opts && opts.animate;
this.onRequestDelete = opts && opts.onRequestDelete;
const dom = $(`
@ -308,6 +309,10 @@ class ListChild {
dom.find('button[data-delete-button]').click(() => {
if (this.onRequestDelete) this.onRequestDelete(this.index);
});
if (animate) {
dom.hide().slideDown();
}
}
markDeleted({ animate = false }) {