Nielsen's departure comes amid reports that Trump was not happy with her handling of immigration issue.