Text this: Dynamic beam control based on electrically switchable nanogratings from conducting polymers