Stephen Barclay told a committee of MPs that the prime minister will "comply" with legislation aimed at blocking no-deal Brexit.