avo 4.1.10 → 4.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/components/avo/field_wrapper_component.rb +5 -4
- data/lib/avo/fields/base_field.rb +1 -1
- data/lib/avo/skills/avo-fields/SKILL.md +1 -1
- data/lib/avo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b75d350bbabce26a04fbe5ff8967073b84ab93ffa6aa38033000c6cdf7023a08
|
|
4
|
+
data.tar.gz: 491411e9d13ea7ee2e6bdc604424019e03540456303d8007fc2afe6b54371e27
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d7a94a371d5c4efdc7ad152e57ffb46dcee355a349cf3873dde1aea54d5b628e1e4a2cb3f3565423847955a2a61bd7a5dcdd180b3f7f9e1c58e75dc9b4e35d65
|
|
7
|
+
data.tar.gz: fb430818f2ed8b7ae860c05a1590ede18c292fc19a684405f52709673be20042da41d5764e78c28bf4f5abfc0209761ee7b12d5bc5d7f6681f4977ee199e1920
|
data/Gemfile.lock
CHANGED
|
@@ -122,12 +122,13 @@ class Avo::FieldWrapperComponent < Avo::BaseComponent
|
|
|
122
122
|
end
|
|
123
123
|
|
|
124
124
|
def stacked?
|
|
125
|
-
#
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
# Fetch it from the field
|
|
125
|
+
# The field declaration is the user's explicit intent, so it wins over the
|
|
126
|
+
# layout default a parent component passes in (sidebars, preview, etc.).
|
|
129
127
|
return @field.stacked unless @field.stacked.nil?
|
|
130
128
|
|
|
129
|
+
# Fallback to what the rendering component asked for
|
|
130
|
+
return @stacked unless @stacked.nil?
|
|
131
|
+
|
|
131
132
|
# Fallback to defaults
|
|
132
133
|
Avo.configuration.field_wrapper_layout == :stacked
|
|
133
134
|
end
|
|
@@ -143,7 +143,7 @@ Every field accepts these common options (full list + types at the field-options
|
|
|
143
143
|
- **`copyable:`** — clipboard icon on Show/Index. Copies the **displayed** (formatted) value.
|
|
144
144
|
- **`link_to_record:`** — make the Index cell a link to the record. Only on `:id`, `:text`, `:gravatar`, and `belongs_to`.
|
|
145
145
|
- **`for_attribute:`** — back the field with a different attribute than its id (lets you show one column two ways).
|
|
146
|
-
- **`width:`** / **`stacked:`** — column width (`25/33/50/66/75/100`; any value <100 auto-stacks) and label-above-value layout.
|
|
146
|
+
- **`width:`** / **`stacked:`** — column width (`25/33/50/66/75/100`; any value <100 auto-stacks) and label-above-value layout. `stacked:` on the field wins everywhere, so `stacked: false` opts out of the auto-stacking and of sidebars/preview stacking too.
|
|
147
147
|
- **`html:`** — attach `style`/`classes`/`data` to the field's wrapper/label/input per view (e.g. right-align a number: `html: {index: {wrapper: {classes: "text-right"}}}`). See the html page.
|
|
148
148
|
|
|
149
149
|
### Computed (block) fields
|
data/lib/avo/version.rb
CHANGED