afterStateUpdated function not working - Filament