Display and value are now accessible as locals in the partials passed to :render_in. You can access them via combobox_display and combobox_value.
Passing an ActiveRecord::Relation or an array of objects as the second parameter to combobox_tag are the only cases where the rendered object is an active record (so, when rendering partial: "colors/color", calling color returns the active record). In all other cases, the rendered object is the display text — that is, the text that's used for filtering and autocompleting (equivalent to combobox_display).
Closes https://github.com/josefarias/hotwire_combobox/issues/101
Display and value are now accessible as locals in the partials passed to
:render_in
. You can access them viacombobox_display
andcombobox_value
.Passing an
ActiveRecord::Relation
or an array of objects as the second parameter tocombobox_tag
are the only cases where the rendered object is an active record (so, when renderingpartial: "colors/color"
, callingcolor
returns the active record). In all other cases, the rendered object is the display text — that is, the text that's used for filtering and autocompleting (equivalent tocombobox_display
).