Added closeOnSelect attribute