On the Grothendieck construction for ∞-categories