Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
enter(element) {
const width = getStyleProperty(element, 'width');
element.style.width = width;
element.style.position = 'absolute';
element.style.visibility = 'hidden';
element.style.height = 'auto';
const height = getStyleProperty(element, 'height');
element.style.width = null;
element.style.position = null;
element.style.visibility = null;
element.style.height = 0;
getStyleProperty(element, 'height'); // Force rerender element to set correct height
setTimeout(() => {
element.style.height = height;
});
},
afterEnter(element) {
enter(element) {
const width = getStyleProperty(element, 'width');
element.style.width = width;
element.style.position = 'absolute';
element.style.visibility = 'hidden';
element.style.height = 'auto';
const height = getStyleProperty(element, 'height');
element.style.width = null;
element.style.position = null;
element.style.visibility = null;
element.style.height = 0;
getStyleProperty(element, 'height'); // Force rerender element to set correct height
setTimeout(() => {
element.style.height = height;
leave(element) {
element.style.height = getStyleProperty(element, 'height');
getStyleProperty(element, 'height'); // Force rerender element to set correct height
setTimeout(() => {
element.style.height = 0;
});
}
}
enter(element) {
const width = getStyleProperty(element, 'width');
element.style.width = width;
element.style.position = 'absolute';
element.style.visibility = 'hidden';
element.style.height = 'auto';
const height = getStyleProperty(element, 'height');
element.style.width = null;
element.style.position = null;
element.style.visibility = null;
element.style.height = 0;
getStyleProperty(element, 'height'); // Force rerender element to set correct height
setTimeout(() => {
element.style.height = height;
});
},
afterEnter(element) {