Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
msawired committed Nov 21, 2023
1 parent 8303de7 commit e70fd75
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ OPC.palette('currentPalette',

**Defaults**


defaultValue: first option in paletteOptions array

### Select (Dropdown)
Expand All @@ -119,12 +120,16 @@ Options can be provided either as an array (such as [1,2,3,4,5]) or a key->value

```javascript
OPC.select(variableName, options, [defaultValue]);
//example with array: OPC.select('circles', [5,4,3,2,1]);
//example with key/value: OPC.select('circles', {"A Lot": 5,"Few": 3,"One": 1});
```

**Defaults**

defaultValue: first value in options array/object.


---

## Passing Arguments as Objects
All OPC components can also be created by passing an object of arguments, such as below. This also allows passing in additional parameters [label, description].
Expand Down

0 comments on commit e70fd75

Please sign in to comment.