Sha256: 09296786779fd28e9b6f46c65ca5740cb781190927b4f213015d3b6abc536a73

Contents?: true

Size: 558 Bytes

Versions: 12

Compression:

Stored size: 558 Bytes

Contents

The `customDisplay` prop can be used to customize the display of the selected item by allowing devs to pass in a component that will be rendered to the left of the default text-based display. In this example the Avatar kit is being used.

The `placeholder` prop can also be used to customize the placeholder text for the default Trigger. 

The `onSelect` prop is a function that gives the dev one argument: the selected option. In this example we are using the `onSelect` to set a state with the selected option and using it to customize the `customDisplay`.

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
playbook_ui_docs-13.27.0 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.md
playbook_ui-13.27.0 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.md
playbook_ui_docs-13.26.0.pre.alpha.PBNTR291Dropdownrailsv22840 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.md
playbook_ui-13.26.0.pre.alpha.PBNTR291Dropdownrailsv22840 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.md
playbook_ui_docs-13.26.0.pre.alpha.jasoncypretpatch12820 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.md
playbook_ui-13.26.0.pre.alpha.jasoncypretpatch12820 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.md
playbook_ui_docs-13.26.0.pre.alpha.jasoncypretpatch12816 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.md
playbook_ui-13.26.0.pre.alpha.jasoncypretpatch12816 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.md
playbook_ui_docs-13.25.0.pre.alpha.PBNTR291Dropdownrailsv22812 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.md
playbook_ui-13.25.0.pre.alpha.PBNTR291Dropdownrailsv22812 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.md
playbook_ui_docs-13.26.0 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.md
playbook_ui-13.26.0 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.md