AutoComplete and Ajax Yii 2.X

Hi everyone

I want to use AutoComplete Widget, but there is a problem. We have to set the source in clientOptions so that when a user starts typing autocomplete matches the value entered with the value of source array. How can we do this dynamically. By dynamic I mean when a user starts typing the values that we need to suggest come from a request (eg. Ajax)

I want to user this in gridview filter

Thanks in advance

https://jqueryui.com/autocomplete/#remote

Thanks,it really helped me!