Surface.Components.Form.Select (surface v0.2.1) View Source

Defines a select.

Provides a wrapper for Phoenix.HTML.Form's select/4 function.

All options passed via opts will be sent to select/4, class can be set directly and will override anything in opts.

Properties

  • form :form - The form identifier.
  • field :string - The field name.
  • id :string - The id of the corresponding select field.
  • name :string - The name of the corresponding select field.
  • class :css_class - The CSS class for the underlying tag.
  • options :any, default: [] - The options in the select.
  • prompt :string - An option to include at the top of the options with the given prompt text.
  • selected :any - The default value to use when none was sent as parameter.
  • opts :keyword, default: [] - Options list.

Link to this section Summary

Link to this section Functions

Callback implementation for Phoenix.LiveComponent.mount/1.

Callback implementation for Phoenix.LiveComponent.render/1.

Callback implementation for Phoenix.LiveComponent.update/2.