Add event onFilter and fix redrawing