The dataset.onReady() function should only be used in the page’s onReady() function, and not in the onChange() event handler.
You are also mixing use of a dataset with wix-data API code. You should use either the dataset or wix-data API code.
You cannot filter a collection using wix-data API and expect the dataset to have the results. The dataset will not change with the query that you have. You will need to filter the dataset using the wix-dataset API .