Skip to content

Commit

Permalink
Fixed #6365 - animate-slidedown fails when a Tailwind prefix is used
Browse files Browse the repository at this point in the history
  • Loading branch information
cagataycivici committed Sep 9, 2024
1 parent 78b8c83 commit 55d4889
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions packages/primevue/src/styleclass/StyleClass.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/primevue/src/styleclass/StyleClass.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';
}

Expand Down

0 comments on commit 55d4889

Please sign in to comment.