Ion-scroll is scrolling incorrectly

I can get it to work if there a way to change scroll=“false” to scroll=“true” during runtime? So if a user has entered text in the search box, the scroll is set to false and vice-versa if the user deletes all text from the search box.

Thank you by the way!

Edit: I found this How to disable content scrolling?