added missing event to change the style of the toggle button
graph sorting menu stays open if view has to be rerendered