change view context for csv builder

this change is proposed by @seanlinsley in #3197 (close #3197)