Custom dashboard menu does not stay open for the custom Taxonomy within it

I solved this by adding following function,

    add_action('parent_file', 'keep_taxonomy_menu_open');
    function keep_taxonomy_menu_open($parent_file) {
      global $current_screen;
      $taxonomy = $current_screen->taxonomy;
      if ($taxonomy == 'directory_category')
        $parent_file="directory";
      return $parent_file;
    }

If you are adding more taxonomies, just change if condition in above code like following

    if ($taxonomy == 'directory_category' or $taxonomy=='tax2' or $taxonomy=='tax3)