Sha256: 4557168f80e2620f368b66ec2e8ac7ac758fa3cfc0c976f5b875a8236d2e4747

Contents?: true

Size: 1.08 KB

Versions: 1742

Compression:

Stored size: 1.08 KB

Contents

#### Rails: Providing the `load_options` Promise

**Additional required props: ** `async: true`, `pills: true`

The prop `load_options`, when used in conjunction with `async: true` and `pills: true`, points to a JavaScript function located within the global window namespace. This function should return a `Promise` which resolves with the list of formatted options as described in prior examples above. This function is identical to the function provided to the React version of this kit. See the code example for more details.

#### React

##### `loadOptions`

**Additional required props: ** `async: true`

[As outlined in the react-select Async docs](https://react-select.com/async), `loadOptions` expects to return a Promise that resolves resolves with the list of formatted options as described in prior examples above. See the code example for more details.

##### `getOptionLabel` + `getOptionValue`

If your server returns data that requires differing field names other than `label` and `value`

See `react-select` docs for more information: https://react-select.com/advanced#replacing-builtins

Version data entries

1,742 entries across 1,742 versions & 2 rubygems

Version Path
playbook_ui_docs-14.8.0.pre.alpha.PLAY1649rolloutheightglobalprops4635 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.md
playbook_ui-14.8.0.pre.alpha.PLAY1649rolloutheightglobalprops4635 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.md
playbook_ui_docs-14.9.0.pre.rc.8 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.md
playbook_ui-14.9.0.pre.rc.8 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.md
playbook_ui_docs-14.8.0.pre.alpha.PLAY1598floatinguiupgrade4617 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.md
playbook_ui-14.8.0.pre.alpha.PLAY1598floatinguiupgrade4617 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.md
playbook_ui_docs-14.9.0.pre.rc.7 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.md
playbook_ui-14.9.0.pre.rc.7 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.md
playbook_ui_docs-14.9.0.pre.rc.6 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.md
playbook_ui-14.9.0.pre.rc.6 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.md
playbook_ui_docs-14.9.0.pre.rc.5 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.md
playbook_ui-14.9.0.pre.rc.5 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.md
playbook_ui_docs-14.8.0.pre.alpha.pbntr661createstickyleftprop4612 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.md
playbook_ui-14.8.0.pre.alpha.pbntr661createstickyleftprop4612 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.md
playbook_ui_docs-14.8.0.pre.alpha.play1648heightglobalprops4606 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.md
playbook_ui-14.8.0.pre.alpha.play1648heightglobalprops4606 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.md
playbook_ui_docs-14.9.0.pre.rc.4 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.md
playbook_ui-14.9.0.pre.rc.4 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.md
playbook_ui_docs-14.9.0.pre.rc.3 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.md
playbook_ui-14.9.0.pre.rc.3 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.md