You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have ExAdmin form like this (simplified real example)
register_resource Role do
action_items except: [:delete]
filter [:id, :name]
form data do
inputs do
input data, :name
inputs :reactions, fields: [:enum], as: :check_boxes, collection: Reaction.all
end
end
query do
%{
all: [
preload: [
[reactions: :substance],
]
],
}
end
end
Relation between Role and Reaction ecto models is many_to_many:
schema "roles" do
field :name, :string
many_to_many :reactions, Reaction, join_through: "roles_reactions"
end
schema "reactions" do
field :enum, Reaction.EctoEnum
belongs_to :substance, Substance
many_to_many :roles, Role, join_through: "roles_reactions"
end
In ExAdmin web interface I expect to see checkboxes with labels (:enum field), but actually I see this
Full structure is just presented as is. Also I would like to construct label of checkbox not only from :enum field of Reaction, but from :enum field of Substance as well (it should be preloaded). Is it possible to do it in ExAdmin?
The text was updated successfully, but these errors were encountered:
I have ExAdmin form like this (simplified real example)
Relation between Role and Reaction ecto models is many_to_many:
In ExAdmin web interface I expect to see checkboxes with labels (:enum field), but actually I see this
Full structure is just presented as is. Also I would like to construct label of checkbox not only from :enum field of Reaction, but from :enum field of Substance as well (it should be preloaded). Is it possible to do it in ExAdmin?
The text was updated successfully, but these errors were encountered: