Made the swatch grid change depending on the input.