0👍
What I think is happening is a loop – Component Inits -> Gets Data -> Updated is called, which again triggers getData again, then the cycle repeats itself.
From what I remember Vue will rerender as long as a variable value is set and it does not care if the old value and the new are the same.
To get around that you should just call getData
inside the selectclass
and handleSearch
. That should prevent the loop from starting.
Look at this warning in the documentation:
https://vuejs.org/api/options-lifecycle.html#updated
Source:stackexchange.com