add loading state css classes when updating