hide pagination when not needed.