PhxComponentHelpers.set_phx_attributes
You're seeing just the function
set_phx_attributes
, go back to PhxComponentHelpers module for more information.
Extends assigns with phx* attributes that can be interpolated within
your component markup. It will automatically detect any attribute prefixed by
phx_
from input assigns.
Parameters
assigns
- your component assigns
Options
:init
- a list of attributes that will be initialized if absent from assigns:required
- raises if required attributes are absent from assigns
Example
assigns
|> set_phx_attributes([:phx_change, :phx_submit], required: [:phx_submit], init: [:phx_change])
assigns
now contains @html_phx_change
and @html_phx_submit
.