Why reset styles after animating in Angular? #25397
Labels
area: animations
freq1: low
P4
A relatively minor issue that is not relevant to core functions
type: bug/fix
Milestone
I'm submitting a...
Current behavior
The Input field appears and stretches during the animation time, and then the styles that were applied during the animation time are removed (the width and border of the input element become standard, not the ones I specified in the "style({})" object
Expected behavior
The input box will appear and stretch to 608 pixels wide and will remain in this position until I click on the closing cross.
Minimal reproduction of the problem with instructions
https://stackblitz.com/edit/angular-3ug5j7?file=app%2Fexample.component.ts
What is the motivation / use case for changing the behavior?
I animate the search bar using Angular animation and ngIf. After the input field appears, when its input animation ends, the applied styles are reset (the width becomes standard and the border disappears). Why is this happening and how to fix it?
Environment
The text was updated successfully, but these errors were encountered: