ForgeComponents
en

Components

j-ToggleBox

jComponent 20 · jcomponent@20 component Example loaded with jComponent 20

ToggleBox can re-order or hide items in Array. The component expects Array.

Configuration:

  • dragdrop {Boolean} Enables/Disables drag&drop (default: true)
  • text {String} A property name for text (it needs to be String, default: name)
  • hidden {String} A property for show/hide (it needs to be Boolean, default: hidden)
  • disabled {Boolean} Can disable the control (default: false)
  • replace {Boolean} Can replace the position of elements (default: false)

Use it with <ui-component name="togglebox">. When the component is not loaded yet, jComponent downloads it on first use from the address in DEF.fallback (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.

example.html
<div style="width:200px">
	<ui-component name="togglebox" path="items"></ui-component>
</div>

<script>
	var items = [{ name: 'Column 1', hidden: false }, { name: 'Column 2', hidden: true }, { name: 'Column 3', hidden: false }, { name: 'Column 4', hidden: false }, { name: 'Column 5', hidden: true }, { name: 'Column 6', hidden: false }, { name: 'Column 7', hidden: false }];
</script>