\chapter{Tables}

% alternate rowcolors for all long-tables
\renewenvironment{longtable}{\rowcolors{2}{LightGray}{white}\oldlongtable} {\endoldlongtable}

\begin{longtable}[l]{| p{40mm} | p{105mm} |}
    \hline
        \rowcolor{Gray}
        \textbf{Term} & \textbf{Description}\\
    \hline
    
    \endfirsthead
    
    \hline
        \rowcolor{Gray}
        \textbf{Term} & \textbf{Description}\\
    \hline
    
    \endhead
    \hiderowcolors
    \endfoot
        \caption{Table example}\label{table:kysymys}\\
    \endlastfoot
    \showrowcolors
    Lotsoflines & like this like this like this like this like this like this like this like this like this like this like this like this like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
    Lots of lines & like this\\
    \hline
\end{longtable}

Table \ref{table:kysymys}