Use an observer to detect changes to the selected legale