Suppose I have $\lbrace x_i,y_i\rbrace_{i=1}^n$ and I have $$y_i = \beta_0 + \beta_1 x_i + \epsilon_i$$ and we have the usual assumptions for OLS. The equation for $\hat{\beta}_1$ is
\begin{align*} \hat{\beta}_1 &= \frac{\sum_{i=1}^n (x_i-\bar{x})(y_i-\bar{y})}{\sum_{i=1}^n(x_i -\bar{x})^2} \\&= \sum_{i=1}^n\frac{ (x_i-\bar{x})}{\sum_{i=1}^n(x_i -\bar{x})^2}y_i - \bar{y}\frac{\sum_{i=1}^n (x_i-\bar{x})}{\sum_{i=1}^n(x_i -\bar{x})^2}\\ \end{align*}
My teacher wrote that we can say
$$\hat{\beta}_1 = \sum_{i=1}^n c_i y_i$$
where $c_i = \frac{ (x_i-\bar{x})}{\sum_{i=1}^n(x_i -\bar{x})^2}$
I don't see how this makes sense. There is clearly a term on the far right that involves the $\bar{y}$. Are there certain situations where we can ignore the $\bar{y}$ term?