Getting data from service to another component

from component A where i have list of All users, when i click on EDIT I send data with user ID to service and from service to component B
In service.ts I create

  selectedUser = new Subject<any>();

From component A

this.userService.selectedUser.next(this.user);

And in component B

ngOnInit() {
this.userService.selectedUser.subscribe(
  user => {
    this.user = user;
  },
  data => {
    if (this.user === undefined) {
      this.addNewUserState = true;
      this.createForm();
    } else {
      this.addNewUserState = false;
      this.addNewUserForm.controls["username"].setValue(this.user.username);
      this.addNewUserForm.controls["firstName"].setValue(this.user.firstName);
    }
  }
)
};

On first DETAIL click I don’t get data, only on second click
here is preview
https://ttprivatenew.s3.amazonaws.com/pulse/bozzodj/attachments/11660135/TinyTake10-10-2019-10-00-04.mp4

Source: New feed
Source Url Getting data from service to another component