Repository navigation
Handle ecto custom types by default #121
Replies: 5 comments
|
Hi @jakespracher if by "handle" you mean offer full support without any extra config, I don't think so, because there would be no way for LiveAdmin to know how the type should be treated, unless you have something specific in mind? But to avoid having them break your instance I think just adding them to https://hexdocs.pm/live_admin/LiveAdmin.html#base_configs_schema/0 |
|
It used to be a string field and could be updated as such, but the custom type adds validation. E.g. So I need to be able to teach LiveAdmin how to edit this field. Not clear on this from the linked function which I also saw in the readme |
This is currently only possible by overriding the form component. |
|
It's not clear how to do this from the documentation |
|
The demo app has an example of using an override: Line 6 in e27a4bb Hopefully that helps point you in the right direction. Unfortunately I don't have time right now to create custom example for your case. |
Uh oh!
There was an error while loading. Please reload this page.
Is it possible to handle custom Ecto type schema fields by default? I just added one and it broke my Live Admin UI for that schema (field cannot be set or updated).
https://hexdocs.pm/ecto/Ecto.Type.html
Need to figure out how to get it working again now.
All reactions