Group - guiled/LRE GitHub Wiki

Groups

Introduction

Group is a new component-like entity available with LRE7 whose aim is to handle the value of many components at the same time.

It is a Data provider

One of the basic use case is to fill many components with the data coming from a table, with very few lines

Quick example

Specific methods

id, realId, name

It will returns the id used when creating the group with sheet.group("id")

add, remove

count

knownChildren

It returns the array of all the group components

get or find

find(realId: string): Component | null

It will return the component matching the given realId.

includes, contains or has

value, virtualValue, rawValue, text

autoLoadSaveClasses, toggle, setToolTip, show, hide, addClass, removeClass, toggleClass

These methods are a shortcut to call them on each component of the group. For example group.toggle() with call component.toggle() for each component of group.

hasClass

It will return true only if every component has the given class

getClasses

Return an array of all the component classes

Non-consistent methods

The following methods are not consistent for groups :

  • parent() and sheet() always return the Sheet that created the group
  • repeater(), entry() always return undefined
  • exists() always return true
  • setChoices() does nothing
  • valueProvider() and dataProvider() return undefined