<% if heading? %>
diff --git a/app/components/avo/modal_component.rb b/app/components/avo/modal_component.rb
index 1f4bf91d2f..00dc9f8897 100644
--- a/app/components/avo/modal_component.rb
+++ b/app/components/avo/modal_component.rb
@@ -7,9 +7,10 @@ class Avo::ModalComponent < Avo::BaseComponent
attr_reader :width
attr_reader :body_class
- def initialize(width: :md, body_class: nil)
+ def initialize(width: :md, body_class: nil, overflow: :auto)
@width = width
@body_class = body_class
+ @overflow = overflow
end
def width_classes
@@ -24,4 +25,8 @@ def width_classes
def height_classes
"max-h-full min-h-1/4 max-h-11/12"
end
+
+ def overflow_classes
+ @overflow == :auto ? "overflow-auto" : ""
+ end
end
diff --git a/spec/dummy/app/avo/resources/store.rb b/spec/dummy/app/avo/resources/store.rb
index 6343a628b1..a4f9baf447 100644
--- a/spec/dummy/app/avo/resources/store.rb
+++ b/spec/dummy/app/avo/resources/store.rb
@@ -12,7 +12,9 @@ def fields
field :location, as: :has_one
end
- field :patrons, as: :has_many, through: :patronships,
+ field :patrons,
+ as: :has_many,
+ through: :patronships,
translation_key: "patrons",
attach_fields: -> {
if ENV["TEST_FILL_JOIN_RECORD"]
diff --git a/spec/dummy/app/avo/resources/team.rb b/spec/dummy/app/avo/resources/team.rb
index 7498f9021c..9299ec1a6a 100644
--- a/spec/dummy/app/avo/resources/team.rb
+++ b/spec/dummy/app/avo/resources/team.rb
@@ -79,7 +79,11 @@ def fields
end
field :admin, as: :has_one, linkable: true
- field :team_members, as: :has_many, through: :memberships, translation_key: "avo.resource_translations.team_members"
+ field :team_members,
+ as: :has_many,
+ through: :memberships,
+ linkable: true,
+ reloadable: true
field :reviews, as: :has_many,
reloadable: -> {
current_user.is_admin?
diff --git a/spec/dummy/db/schema.rb b/spec/dummy/db/schema.rb
index b73ba37948..3e1141a484 100644
--- a/spec/dummy/db/schema.rb
+++ b/spec/dummy/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema[8.0].define(version: 2024_04_10_120015) do
+ActiveRecord::Schema[8.0].define(version: 2024_07_24_090242) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -171,7 +171,7 @@
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "price_cents", default: 0, null: false
- t.string "price_currency", default: "USD", null: false
+ t.string "price_currency", default: "'USD'::character varying", null: false
end
create_table "projects", force: :cascade do |t|