solving the issue of name not getting selected by default when page first load so that direction filter can work