From 2738b21bf3efad6b3735e58059f4df176a7e955e Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Tue, 26 Jan 2021 14:42:59 +0000 Subject: [PATCH] Add opening animation to ListChild --- client/src/entrypoints/admin/telepath/blocks.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/src/entrypoints/admin/telepath/blocks.js b/client/src/entrypoints/admin/telepath/blocks.js index 7163b5e6a0..d8cc952ef7 100644 --- a/client/src/entrypoints/admin/telepath/blocks.js +++ b/client/src/entrypoints/admin/telepath/blocks.js @@ -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 }) {