Fixed #6365 - animate-slidedown fails when a Tailwind prefix is used

pull/6367/head
Cagatay Civici 2024-09-09 21:11:36 +03:00
parent 78b8c8330a
commit 55d4889d37
2 changed files with 6 additions and 2 deletions

View File

@ -44,6 +44,10 @@ export interface StyleClassOptions {
* Style class to add when leave animation is completed.
*/
leaveToClass?: string | undefined;
/**
* Special class name to hide an element, only used in slide animation.
*/
hiddenClass?: string | undefined;
/**
* Whether to trigger leave animation when outside of the element is clicked.
* @defaultValue false

View File

@ -43,9 +43,9 @@ const StyleClass = BaseStyleClass.extend('styleclass', {
if (binding.value.enterActiveClass.includes('slidedown')) {
target.style.height = '0px';
removeClass(target, 'hidden');
removeClass(target, binding.value.hiddenClass || binding.value.enterFromClass);
target.style.maxHeight = target.scrollHeight + 'px';
addClass(target, 'hidden');
addClass(target, binding.value.hiddenClass || binding.value.enterActiveClass);
target.style.height = '';
}