Donald Trump appeared to snub Theresa May when asked about his relationship with his fellow G7 leaders at their summit in Canada.