Update fix for issue #121 + fix issue #123

Use the built-in dirty state to handle row changes instead of the custom
state variable introduced in the previous commit.
Additionally this solves issue #123 by setting the dirty state when rows
are removed or sorted.