Skip to content

Add field parameter to the rating component #474

@tanguilp

Description

@tanguilp

Hi again,

Looks like the rating component is not only RO but can also act as a form input, sending events from user 🎉

However, I would suggest, since it is meant to be used within the Phoenix framework, to switch to using a field parameter as input instead of sending events. It would be more coherent with the framework.

Something like:

<.rating field={@form[:rating]}/>

I've actually built such a component 2 years ago, here's a gist I shared at that time: https://gist.github.com/tanguilp/d32a89fe1e3f5b96a1397fa1434c1f94

Cheers!

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions