Open Paul-Bob opened 10 months ago
Maybe we can add a sidebar to the Index
view ...
An alternative DSL would be something like this.
field :posts, as: :has_many, sidebar: -> do
tool Avo::ResourceTools::SidebarTool
end
I was thinking the same but it have a minor issue, forcing to only 1 sidebar on that panel.
Maybe something like:
field :posts, as: :has_many, panel: -> do
field # this render the field :posts, as: :has_many
sidebar panel_wrapper: false do
tool Avo::ResourceTools::SidebarTool, render_panel: true
end
end
Not great, the idea is to allow multiple sidebars
Or maybe
field :posts, as: :has_many, sidebars: -> do
sidebar do
tool Avo::ResourceTools::SidebarTool
end
end
This issue has been marked as stale because there was no activity for the past 15 days.
We currently use the following format:
main_panel do
field :subrecords, as: :has_many
sidebar do
field :sidebar_field, as: :text
end
end
The problem is the has_many field is in a wrapper. Is there any way to turn off the wrapper as a temporary workaround until this feature is released?
No, there isn't a woraround for that yet.
Would you be open to send in a PR for this @iyerushalmi?
Feature
Add the possibility to add a sidebar to a
has_many
field panel.Current workarounds
This is creating a panel around the
has_many
and the sidebar, leading towhite_panel_classes
on thehas_many
panel background and also the buttons are not above the sidebar. Ideally we should be able to insert thesidebar
inside thehas_many
fieldScreenshots or screen recordings