When entering the panel, we will call to this function with `init = true`. Please check line 381.