Sha256: 34e3a3ef6d8deae487186d2a08ef07e8176c650a62e76df58309464bac4f3c00
Contents?: true
Size: 466 Bytes
Versions: 22
Compression:
Stored size: 466 Bytes
Contents
class SidebarTableSection < Prime::TableSection def sidebar_items [ {title: 'Home Screen', action: :open_home}, {title: 'Help Screen', action: :open_help} ] end def table_data sidebar_items.map do |model| SidebarActionSection.new(model: model) end end def on_click(table, index) section = data[index.row] return false if !section || !section.model[:action] screen.send section.model[:action].to_sym end end
Version data entries
22 entries across 22 versions & 1 rubygems