allow to pass an anonymous function on the scroll feature

Signed-off-by: Bruno Gaspar <brunofgaspar1@gmail.com>