angular - Setting the width of an element to another element -


i have search bar , drop-down suggestions. dropdown have same width search bar search bars width dynamic depending on window size. how can set width of autocomplete dropdown dynamically updates width of search input?

i angular 2+ solution (i've seen couple based on jquery). seems basic question couldn't find solution online.

you can track current width of search bar using snippet answer:

https://stackoverflow.com/a/39084344/8490932

and inject extracted width style.width input of auto-complete dropdown.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -