@@ -172,7 +172,7 @@ def select_input_row(form, name, select_options, options = {})
172172 safe_join [
173173 content_tag ( :div , class : "input-group" ) do
174174 safe_join [
175- form . select ( name , select_options , options . compact , { class : "form-control col-auto form-select #{ "is-invalid" if form . object &.errors &.include? ( name ) && !form . object . errors [ name ] . empty? } " } ) ,
175+ form . select ( name , select_options , options . compact , { data : { controller : "searchable-select" } , class : "form-control col-auto form-select #{ "is-invalid" if form . object &.errors &.include? ( name ) && !form . object . errors [ name ] . empty? } " } ) ,
176176 ( link_to ( options [ :button ] [ :label ] , options [ :button ] [ :path ] , class : "btn btn-outline-secondary col-auto" ) if options [ :button ] )
177177 ]
178178 end ,
@@ -192,7 +192,7 @@ def collection_select_input_row(form, name, collection, value_method, text_metho
192192 safe_join [
193193 content_tag ( :div , class : "input-group" ) do
194194 safe_join [
195- form . collection_select ( :"#{ name } _id" , collection , value_method , text_method , options . compact , { class : "form-control col-auto form-select #{ "is-invalid" if form . object &.errors &.include? ( name ) && !form . object . errors [ name ] . empty? } " } ) ,
195+ form . collection_select ( :"#{ name } _id" , collection , value_method , text_method , options . compact , { data : { controller : "searchable-select" } , class : "form-control col-auto form-select #{ "is-invalid" if form . object &.errors &.include? ( name ) && !form . object . errors [ name ] . empty? } " } ) ,
196196 ( link_to ( options [ :button ] [ :label ] , options [ :button ] [ :path ] , class : "btn btn-outline-secondary col-auto" ) if options [ :button ] )
197197 ]
198198 end ,
0 commit comments