Add support for callbacks when expand/unexpand happens