trigger an event when searching