EccHideable
EccHideable is an invisible container whose only purpose is to be shown or hidden as a whole by a page validator. Use it to hide several fields or groups with one call.
TSX
import { EccHideable } from "@/ecc/components/forms/EccHideable";
Example
TSX
<EccHideable id="div-hygiene">
<EccBoolean value="purchase.hygiene" data={draft} valueOut editable trueLabel="Hygiene approval" falseLabel="Hygiene approval" />
<EccText fieldLabel="Hygiene note" value="purchase.hygieneNote" data={draft} valueOut editable />
</EccHideable>
TSX
this.setHidden("div-hygiene", type !== "medical-devices"); // in the validator
Ecc components in this example: EccBoolean, EccText - how to use them is described in UI Components.
Behaviour
- Visible, it renders a plain
divwith itsid,classNameandstyle- no border, no spacing. - Hidden by
setHidden(id, true), it renders nothing, including its children.
Props
Prop
Type
Default
Description
|
| - | for |
| styling of the |
Related
Page
Relation
overview of all layout components | |
shows and hides the container by | |
can be hidden the same way, but draws a box |
Was this section helpful?
On this page
- EccHideable