Skip to content

Preview

The Preview field adds a tiny icon to each row on the Index view that, when hovered, it will display a preview popup with more information regarding that record.

An Avo Teams index table where hovering the preview icon on a row opens a popup showing that record's preview fields.
ruby
field :preview, as: :preview

Define the fields

The fields shown in the preview popup are configured similarly to how you configure the visibility in the different views.

When you want to display a field in the preview popup simply call the show_on :preview option on the field.

ruby
  field :name, as: :text, show_on :preview

Authorization

The preview request authorization is controlled with the preview? policy method.