mirror of
https://github.com/noodlapp/noodl-docs.git
synced 2026-01-12 07:12:53 +01:00
Initial commit
Co-Authored-By: kotte <14197736+mrtamagotchi@users.noreply.github.com> Co-Authored-By: mikaeltellhed <2311083+mikaeltellhed@users.noreply.github.com> Co-Authored-By: Tore Knudsen <18231882+torekndsn@users.noreply.github.com> Co-Authored-By: Michael Cartner <32543275+michaelcartner@users.noreply.github.com>
This commit is contained in:
28
library/prefabs/multi-choice/README.md
Normal file
28
library/prefabs/multi-choice/README.md
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
title: Multi Choice
|
||||
hide_title: true
|
||||
---
|
||||
|
||||
# Multi Choice
|
||||
|
||||
A simple component for multi choice selection comprising a group of checkboxes.
|
||||
|
||||
<div className="ndl-image-with-background">
|
||||
|
||||

|
||||
|
||||
</div>
|
||||
|
||||
After importing the module you will see a component called **Multi Choice** in your project.
|
||||
|
||||
The example below shows how to hook the **Multi Choice** up to data in an **Object**, you can save the value back to the object with the **Set Object Properties** using the **Selection Changed** signal.
|
||||
|
||||
<div className="ndl-image-with-background xl">
|
||||
|
||||

|
||||
|
||||
</div>
|
||||
|
||||
As input it takes three arrays of strings, one containing all possible options, the **Options** input, this is the "value" of the options, it might differ from the labels, i.e. what is shown on screen. This you can specify with the **Labels** array input, it must have the same number of strings in the array, each one corresponding to a value in the **Options** array.
|
||||
|
||||
The final array is the **Selection** array, it contains all options that are selection. There is also an output from the component called **Selection** which is updated when the user interacts with the component, the **Selection Changed** event is triggered.
|
||||
Reference in New Issue
Block a user