Re-sort lsit on edit if a sorting function exists.

refs openhealthcare/elcid#324