Sha256: e3230dc3050b46578d245f1d49ee583cfa852cd22e86e0d1485cbdb3a2c545c2
Contents?: true
Size: 873 Bytes
Versions: 87
Compression:
Stored size: 873 Bytes
Contents
# This concern helps us figure out what kind of items (field, tool, tab_group, or panel) have been passed to the resource or action. module Avo module Concerns module IsResourceItem include Avo::Concerns::Hydration # These attributes are required to be hydrated in order to properly find the visible_items attr_accessor :resource attr_accessor :view # Returns the final state of if an item is visible or not # For items that have children it checks to see if it contains any visible children. def visible? # For items that may contains other items like tabs and panels we should also check # if any on their children have visible items. if self.class.ancestors.include?(Avo::Concerns::HasItems) return false unless visible_items.any? end super end end end end
Version data entries
87 entries across 87 versions & 1 rubygems