President Trump visited with an officer who had been shot seven times in the attack, the White House said.