@rio-cloud/uikit-mcp 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -40
- package/dist/doc-metadata.json +1872 -0
- package/dist/docs/components/accentBar.md +582 -0
- package/dist/docs/components/activity.md +330 -0
- package/dist/docs/components/animatedNumber.md +88 -0
- package/dist/docs/components/animatedTextReveal.md +381 -0
- package/dist/docs/components/animations.md +459 -0
- package/dist/docs/components/appHeader.md +737 -0
- package/dist/docs/components/appLayout.md +2016 -0
- package/dist/docs/components/appNavigationBar.md +274 -0
- package/dist/docs/components/areaCharts.md +828 -0
- package/dist/docs/components/aspectRatioPlaceholder.md +106 -0
- package/dist/docs/components/assetTree.md +3223 -0
- package/dist/docs/components/autosuggests.md +1177 -0
- package/dist/docs/components/avatar.md +206 -0
- package/dist/docs/components/banner.md +668 -0
- package/dist/docs/components/barCharts.md +2785 -0
- package/dist/docs/components/barList.md +517 -0
- package/dist/docs/components/basicMap.md +167 -0
- package/dist/docs/components/bottomSheet.md +721 -0
- package/dist/docs/components/button.md +775 -0
- package/dist/docs/components/buttonToolbar.md +134 -0
- package/dist/docs/components/calendarStripe.md +525 -0
- package/dist/docs/components/card.md +86 -0
- package/dist/docs/components/carousel.md +128 -0
- package/dist/docs/components/chartColors.md +716 -0
- package/dist/docs/components/chartsGettingStarted.md +28 -0
- package/dist/docs/components/chat.md +932 -0
- package/dist/docs/components/checkbox.md +996 -0
- package/dist/docs/components/clearableInput.md +806 -0
- package/dist/docs/components/collapse.md +189 -0
- package/dist/docs/components/composedCharts.md +424 -0
- package/dist/docs/components/contentLoader.md +674 -0
- package/dist/docs/components/dataTabs.md +1251 -0
- package/dist/docs/components/datepickers.md +2543 -0
- package/dist/docs/components/dialogs.md +2244 -0
- package/dist/docs/components/divider.md +219 -0
- package/dist/docs/components/dropdowns.md +17550 -0
- package/dist/docs/components/editableContent.md +1127 -0
- package/dist/docs/components/expander.md +970 -0
- package/dist/docs/components/fade.md +836 -0
- package/dist/docs/components/fadeExpander.md +180 -0
- package/dist/docs/components/fadeUp.md +396 -0
- package/dist/docs/components/feedback.md +758 -0
- package/dist/docs/components/filePickers.md +370 -0
- package/dist/docs/components/formLabel.md +251 -0
- package/dist/docs/components/fullscreenMap.md +10 -0
- package/dist/docs/components/groupedItemList.md +1001 -0
- package/dist/docs/components/iconList.md +306 -0
- package/dist/docs/components/imagePreloader.md +167 -0
- package/dist/docs/components/labeledElement.md +115 -0
- package/dist/docs/components/licensePlate.md +412 -0
- package/dist/docs/components/lineCharts.md +2014 -0
- package/dist/docs/components/listMenu.md +392 -0
- package/dist/docs/components/loadMore.md +219 -0
- package/dist/docs/components/mainNavigation.md +129 -0
- package/dist/docs/components/mapCircle.md +93 -0
- package/dist/docs/components/mapCluster.md +337 -0
- package/dist/docs/components/mapContext.md +284 -0
- package/dist/docs/components/mapDraggableMarker.md +150 -0
- package/dist/docs/components/mapGettingStarted.md +39 -0
- package/dist/docs/components/mapInfoBubble.md +135 -0
- package/dist/docs/components/mapLayerGroup.md +94 -0
- package/dist/docs/components/mapMarker.md +1814 -0
- package/dist/docs/components/mapPolygon.md +959 -0
- package/dist/docs/components/mapRoute.md +3816 -0
- package/dist/docs/components/mapRouteGenerator.md +6 -0
- package/dist/docs/components/mapSettings.md +1040 -0
- package/dist/docs/components/mapUtils.md +132 -0
- package/dist/docs/components/multiselects.md +1921 -0
- package/dist/docs/components/noData.md +210 -0
- package/dist/docs/components/notifications.md +314 -0
- package/dist/docs/components/numbercontrol.md +706 -0
- package/dist/docs/components/onboarding.md +297 -0
- package/dist/docs/components/page.md +241 -0
- package/dist/docs/components/pager.md +133 -0
- package/dist/docs/components/pieCharts.md +1284 -0
- package/dist/docs/components/popover.md +222 -0
- package/dist/docs/components/position.md +50 -0
- package/dist/docs/components/radialBarCharts.md +3663 -0
- package/dist/docs/components/radiobutton.md +1271 -0
- package/dist/docs/components/releaseNotes.md +135 -0
- package/dist/docs/components/resizer.md +162 -0
- package/dist/docs/components/responsiveColumnStripe.md +435 -0
- package/dist/docs/components/responsiveVideo.md +71 -0
- package/dist/docs/components/rioglyph.md +331 -0
- package/dist/docs/components/rules.md +965 -0
- package/dist/docs/components/saveableInput.md +1721 -0
- package/dist/docs/components/selects.md +1993 -0
- package/dist/docs/components/sidebar.md +332 -0
- package/dist/docs/components/sliders.md +376 -0
- package/dist/docs/components/smoothScrollbars.md +1180 -0
- package/dist/docs/components/spinners.md +506 -0
- package/dist/docs/components/states.md +1176 -0
- package/dist/docs/components/statsWidgets.md +636 -0
- package/dist/docs/components/statusBar.md +644 -0
- package/dist/docs/components/stepButton.md +61 -0
- package/dist/docs/components/steppedProgressBars.md +1064 -0
- package/dist/docs/components/subNavigation.md +470 -0
- package/dist/docs/components/supportMarker.md +115 -0
- package/dist/docs/components/svgImage.md +248 -0
- package/dist/docs/components/switch.md +554 -0
- package/dist/docs/components/tables.md +8 -0
- package/dist/docs/components/tagManager.md +476 -0
- package/dist/docs/components/tags.md +785 -0
- package/dist/docs/components/teaser.md +925 -0
- package/dist/docs/components/timeline.md +514 -0
- package/dist/docs/components/timepicker.md +262 -0
- package/dist/docs/components/toggleButton.md +178 -0
- package/dist/docs/components/tooltip.md +454 -0
- package/dist/docs/components/virtualList.md +483 -0
- package/dist/docs/foundations.md +20901 -0
- package/dist/docs/start/changelog.md +439 -0
- package/dist/docs/start/goodtoknow.md +14 -0
- package/dist/docs/start/guidelines/color-combinations.md +678 -0
- package/dist/docs/start/guidelines/custom-css.md +42 -0
- package/dist/docs/start/guidelines/custom-rioglyph.md +35 -0
- package/dist/docs/start/guidelines/formatting.md +587 -0
- package/dist/docs/start/guidelines/iframe.md +323 -0
- package/dist/docs/start/guidelines/obfuscate-data.md +30 -0
- package/dist/docs/start/guidelines/print-css.md +36 -0
- package/dist/docs/start/guidelines/spinner.md +710 -0
- package/dist/docs/start/guidelines/supported-browsers.md +10 -0
- package/dist/docs/start/guidelines/writing.md +635 -0
- package/dist/docs/start/howto.md +187 -0
- package/dist/docs/start/intro.md +43 -0
- package/dist/docs/start/responsiveness.md +98 -0
- package/dist/docs/templates/common-table.md +1111 -0
- package/dist/docs/templates/detail-views.md +942 -0
- package/dist/docs/templates/expandable-details.md +228 -0
- package/dist/docs/templates/feature-cards.md +549 -0
- package/dist/docs/templates/form-summary.md +199 -0
- package/dist/docs/templates/form-toggle.md +367 -0
- package/dist/docs/templates/list-blocks.md +1021 -0
- package/dist/docs/templates/loading-progress.md +109 -0
- package/dist/docs/templates/options-panel.md +152 -0
- package/dist/docs/templates/panel-variants.md +164 -0
- package/dist/docs/templates/progress-cards.md +607 -0
- package/dist/docs/templates/progress-success.md +142 -0
- package/dist/docs/templates/settings-form.md +434 -0
- package/dist/docs/templates/stats-blocks.md +1381 -0
- package/dist/docs/templates/table-panel.md +184 -0
- package/dist/docs/templates/table-row-animation.md +317 -0
- package/dist/docs/templates/usage-cards.md +227 -0
- package/dist/docs/utilities/deviceUtils.md +123 -0
- package/dist/docs/utilities/featureToggles.md +90 -0
- package/dist/docs/utilities/fuelTypeUtils.md +186 -0
- package/dist/docs/utilities/routeUtils.md +138 -0
- package/dist/docs/utilities/useAfterMount.md +66 -0
- package/dist/docs/utilities/useAutoAnimate.md +193 -0
- package/dist/docs/utilities/useAverage.md +95 -0
- package/dist/docs/utilities/useClickOutside.md +61 -0
- package/dist/docs/utilities/useClipboard.md +93 -0
- package/dist/docs/utilities/useCount.md +178 -0
- package/dist/docs/utilities/useDarkMode.md +49 -0
- package/dist/docs/utilities/useDebugInfo.md +126 -0
- package/dist/docs/utilities/useEffectOnce.md +58 -0
- package/dist/docs/utilities/useElapsedTime.md +58 -0
- package/dist/docs/utilities/useElementSize.md +71 -0
- package/dist/docs/utilities/useEsc.md +58 -0
- package/dist/docs/utilities/useEvent.md +64 -0
- package/dist/docs/utilities/useFocusTrap.md +85 -0
- package/dist/docs/utilities/useFullscreen.md +198 -0
- package/dist/docs/utilities/useHover.md +55 -0
- package/dist/docs/utilities/useIncomingPostMessages.md +237 -0
- package/dist/docs/utilities/useInterval.md +85 -0
- package/dist/docs/utilities/useIsFocusWithin.md +114 -0
- package/dist/docs/utilities/useKey.md +151 -0
- package/dist/docs/utilities/useLocalStorage.md +91 -0
- package/dist/docs/utilities/useLocationSuggestions.md +114 -0
- package/dist/docs/utilities/useMax.md +62 -0
- package/dist/docs/utilities/useMin.md +78 -0
- package/dist/docs/utilities/useMutationObserver.md +113 -0
- package/dist/docs/utilities/useOnScreen.md +138 -0
- package/dist/docs/utilities/useOnlineStatus.md +49 -0
- package/dist/docs/utilities/usePostMessage.md +117 -0
- package/dist/docs/utilities/usePostMessageSender.md +257 -0
- package/dist/docs/utilities/usePrevious.md +101 -0
- package/dist/docs/utilities/useResizeObserver.md +151 -0
- package/dist/docs/utilities/useScrollPosition.md +252 -0
- package/dist/docs/utilities/useSearch.md +228 -0
- package/dist/docs/utilities/useSorting.md +389 -0
- package/dist/docs/utilities/useStateWithValidation.md +83 -0
- package/dist/docs/utilities/useSum.md +155 -0
- package/dist/docs/utilities/useTableExport.md +404 -0
- package/dist/docs/utilities/useTableSelection.md +1120 -0
- package/dist/docs/utilities/useTimeout.md +55 -0
- package/dist/docs/utilities/useToggle.md +115 -0
- package/dist/docs/utilities/useWindowResize.md +70 -0
- package/dist/index.mjs +271 -0
- package/dist/search-synonyms.json +134 -0
- package/dist/version.json +4 -0
- package/package.json +23 -19
- package/bin/uikit-mcp.mjs +0 -23
- package/data/pages/Components/components/accentbar.json +0 -207
- package/data/pages/Components/components/activity.json +0 -87
- package/data/pages/Components/components/animatednumber.json +0 -99
- package/data/pages/Components/components/animations.json +0 -87
- package/data/pages/Components/components/appheader.json +0 -291
- package/data/pages/Components/components/applayout.json +0 -1198
- package/data/pages/Components/components/appnavigationbar.json +0 -327
- package/data/pages/Components/components/areacharts.json +0 -563
- package/data/pages/Components/components/aspectratioplaceholder.json +0 -75
- package/data/pages/Components/components/assettree.json +0 -3080
- package/data/pages/Components/components/autosuggests.json +0 -710
- package/data/pages/Components/components/avatar.json +0 -157
- package/data/pages/Components/components/banner.json +0 -599
- package/data/pages/Components/components/barcharts.json +0 -1507
- package/data/pages/Components/components/barlist.json +0 -223
- package/data/pages/Components/components/basicmap.json +0 -68
- package/data/pages/Components/components/bottomsheet.json +0 -601
- package/data/pages/Components/components/button.json +0 -583
- package/data/pages/Components/components/buttontoolbar.json +0 -63
- package/data/pages/Components/components/calendarstripe.json +0 -235
- package/data/pages/Components/components/card.json +0 -69
- package/data/pages/Components/components/carousel.json +0 -39
- package/data/pages/Components/components/chartcolors.json +0 -34
- package/data/pages/Components/components/chartsgettingstarted.json +0 -32
- package/data/pages/Components/components/chat.json +0 -39
- package/data/pages/Components/components/checkbox.json +0 -847
- package/data/pages/Components/components/clearableinput.json +0 -789
- package/data/pages/Components/components/collapse.json +0 -175
- package/data/pages/Components/components/composedcharts.json +0 -159
- package/data/pages/Components/components/contentloader.json +0 -233
- package/data/pages/Components/components/datatabs.json +0 -680
- package/data/pages/Components/components/datepickers.json +0 -287
- package/data/pages/Components/components/dialogs.json +0 -1492
- package/data/pages/Components/components/divider.json +0 -93
- package/data/pages/Components/components/dropdowns.json +0 -936
- package/data/pages/Components/components/editablecontent.json +0 -1117
- package/data/pages/Components/components/expander.json +0 -377
- package/data/pages/Components/components/fade.json +0 -403
- package/data/pages/Components/components/fadeexpander.json +0 -75
- package/data/pages/Components/components/fadeup.json +0 -127
- package/data/pages/Components/components/feedback.json +0 -269
- package/data/pages/Components/components/filepickers.json +0 -269
- package/data/pages/Components/components/formlabel.json +0 -115
- package/data/pages/Components/components/fullscreenmap.json +0 -22
- package/data/pages/Components/components/groupeditemlist.json +0 -323
- package/data/pages/Components/components/iconlist.json +0 -45
- package/data/pages/Components/components/imagepreloader.json +0 -81
- package/data/pages/Components/components/labeledelement.json +0 -75
- package/data/pages/Components/components/licenseplate.json +0 -69
- package/data/pages/Components/components/linecharts.json +0 -987
- package/data/pages/Components/components/listmenu.json +0 -313
- package/data/pages/Components/components/loadmore.json +0 -175
- package/data/pages/Components/components/mainnavigation.json +0 -39
- package/data/pages/Components/components/mapcircle.json +0 -34
- package/data/pages/Components/components/mapcluster.json +0 -51
- package/data/pages/Components/components/mapcontext.json +0 -105
- package/data/pages/Components/components/mapdraggablemarker.json +0 -34
- package/data/pages/Components/components/mapgettingstarted.json +0 -27
- package/data/pages/Components/components/mapgroup.json +0 -1198
- package/data/pages/Components/components/mapinfobubble.json +0 -34
- package/data/pages/Components/components/maplayergroup.json +0 -34
- package/data/pages/Components/components/mapmarker.json +0 -700
- package/data/pages/Components/components/mappolygon.json +0 -45
- package/data/pages/Components/components/maproute.json +0 -623
- package/data/pages/Components/components/maproutegenerator.json +0 -16
- package/data/pages/Components/components/mapsettings.json +0 -51
- package/data/pages/Components/components/maputils.json +0 -34
- package/data/pages/Components/components/multiselects.json +0 -1451
- package/data/pages/Components/components/nodata.json +0 -139
- package/data/pages/Components/components/notifications.json +0 -65
- package/data/pages/Components/components/numbercontrol.json +0 -301
- package/data/pages/Components/components/onboarding.json +0 -302
- package/data/pages/Components/components/page.json +0 -197
- package/data/pages/Components/components/pager.json +0 -93
- package/data/pages/Components/components/piecharts.json +0 -731
- package/data/pages/Components/components/popover.json +0 -251
- package/data/pages/Components/components/position.json +0 -69
- package/data/pages/Components/components/radialbarcharts.json +0 -1304
- package/data/pages/Components/components/radiobutton.json +0 -1105
- package/data/pages/Components/components/releasenotes.json +0 -44
- package/data/pages/Components/components/resizer.json +0 -93
- package/data/pages/Components/components/responsivecolumnstripe.json +0 -123
- package/data/pages/Components/components/responsivevideo.json +0 -75
- package/data/pages/Components/components/rioglyph.json +0 -93
- package/data/pages/Components/components/rules.json +0 -410
- package/data/pages/Components/components/saveableinput.json +0 -703
- package/data/pages/Components/components/selects.json +0 -701
- package/data/pages/Components/components/sidebar.json +0 -243
- package/data/pages/Components/components/sliders.json +0 -235
- package/data/pages/Components/components/smoothscrollbars.json +0 -335
- package/data/pages/Components/components/spinners.json +0 -343
- package/data/pages/Components/components/states.json +0 -1705
- package/data/pages/Components/components/statswidgets.json +0 -314
- package/data/pages/Components/components/statusbar.json +0 -177
- package/data/pages/Components/components/stepbutton.json +0 -57
- package/data/pages/Components/components/steppedprogressbars.json +0 -417
- package/data/pages/Components/components/subnavigation.json +0 -107
- package/data/pages/Components/components/supportmarker.json +0 -45
- package/data/pages/Components/components/svgimage.json +0 -81
- package/data/pages/Components/components/switch.json +0 -111
- package/data/pages/Components/components/tables.json +0 -144
- package/data/pages/Components/components/tagmanager.json +0 -86
- package/data/pages/Components/components/tags.json +0 -146
- package/data/pages/Components/components/teaser.json +0 -188
- package/data/pages/Components/components/timeline.json +0 -45
- package/data/pages/Components/components/timepicker.json +0 -163
- package/data/pages/Components/components/togglebutton.json +0 -247
- package/data/pages/Components/components/tooltip.json +0 -270
- package/data/pages/Components/components/virtuallist.json +0 -175
- package/data/pages/Foundations/foundations.json +0 -2475
- package/data/pages/Getting-started/start/changelog.json +0 -22
- package/data/pages/Getting-started/start/goodtoknow.json +0 -32
- package/data/pages/Getting-started/start/guidelines/color-combinations.json +0 -58
- package/data/pages/Getting-started/start/guidelines/custom-css.json +0 -27
- package/data/pages/Getting-started/start/guidelines/custom-rioglyph.json +0 -22
- package/data/pages/Getting-started/start/guidelines/formatting.json +0 -97
- package/data/pages/Getting-started/start/guidelines/iframe.json +0 -93
- package/data/pages/Getting-started/start/guidelines/obfuscate-data.json +0 -22
- package/data/pages/Getting-started/start/guidelines/print-css.json +0 -37
- package/data/pages/Getting-started/start/guidelines/spinner.json +0 -144
- package/data/pages/Getting-started/start/guidelines/supported-browsers.json +0 -22
- package/data/pages/Getting-started/start/guidelines/writing.json +0 -242
- package/data/pages/Getting-started/start/howto.json +0 -72
- package/data/pages/Getting-started/start/intro.json +0 -37
- package/data/pages/Getting-started/start/responsiveness.json +0 -52
- package/data/pages/Templates/templates/common-table.json +0 -39
- package/data/pages/Templates/templates/detail-views.json +0 -71
- package/data/pages/Templates/templates/expandable-details.json +0 -39
- package/data/pages/Templates/templates/feature-cards.json +0 -103
- package/data/pages/Templates/templates/form-summary.json +0 -39
- package/data/pages/Templates/templates/form-toggle.json +0 -39
- package/data/pages/Templates/templates/list-blocks.json +0 -119
- package/data/pages/Templates/templates/loading-progress.json +0 -39
- package/data/pages/Templates/templates/options-panel.json +0 -39
- package/data/pages/Templates/templates/panel-variants.json +0 -39
- package/data/pages/Templates/templates/progress-cards.json +0 -71
- package/data/pages/Templates/templates/progress-success.json +0 -39
- package/data/pages/Templates/templates/settings-form.json +0 -39
- package/data/pages/Templates/templates/stats-blocks.json +0 -135
- package/data/pages/Templates/templates/table-panel.json +0 -39
- package/data/pages/Templates/templates/table-row-animation.json +0 -39
- package/data/pages/Templates/templates/usage-cards.json +0 -39
- package/data/pages/Utilities/utilities/deviceutils.json +0 -39
- package/data/pages/Utilities/utilities/featuretoggles.json +0 -42
- package/data/pages/Utilities/utilities/fueltypeutils.json +0 -118
- package/data/pages/Utilities/utilities/routeutils.json +0 -34
- package/data/pages/Utilities/utilities/useaftermount.json +0 -63
- package/data/pages/Utilities/utilities/useaverage.json +0 -86
- package/data/pages/Utilities/utilities/useclickoutside.json +0 -69
- package/data/pages/Utilities/utilities/useclipboard.json +0 -57
- package/data/pages/Utilities/utilities/usecount.json +0 -92
- package/data/pages/Utilities/utilities/usedarkmode.json +0 -50
- package/data/pages/Utilities/utilities/usedebuginfo.json +0 -63
- package/data/pages/Utilities/utilities/useeffectonce.json +0 -57
- package/data/pages/Utilities/utilities/useelapsedtime.json +0 -57
- package/data/pages/Utilities/utilities/useelementsize.json +0 -63
- package/data/pages/Utilities/utilities/useesc.json +0 -57
- package/data/pages/Utilities/utilities/useevent.json +0 -75
- package/data/pages/Utilities/utilities/usefocustrap.json +0 -57
- package/data/pages/Utilities/utilities/usefullscreen.json +0 -197
- package/data/pages/Utilities/utilities/usehover.json +0 -57
- package/data/pages/Utilities/utilities/useinterval.json +0 -63
- package/data/pages/Utilities/utilities/useisfocuswithin.json +0 -75
- package/data/pages/Utilities/utilities/usekey.json +0 -75
- package/data/pages/Utilities/utilities/uselocalstorage.json +0 -69
- package/data/pages/Utilities/utilities/uselocationsuggestions.json +0 -110
- package/data/pages/Utilities/utilities/usemax.json +0 -86
- package/data/pages/Utilities/utilities/usemin.json +0 -86
- package/data/pages/Utilities/utilities/usemutationobserver.json +0 -69
- package/data/pages/Utilities/utilities/useonlinestatus.json +0 -39
- package/data/pages/Utilities/utilities/useonscreen.json +0 -63
- package/data/pages/Utilities/utilities/usepostmessage.json +0 -80
- package/data/pages/Utilities/utilities/useprevious.json +0 -63
- package/data/pages/Utilities/utilities/useresizeobserver.json +0 -65
- package/data/pages/Utilities/utilities/usescrollposition.json +0 -103
- package/data/pages/Utilities/utilities/usesearch.json +0 -197
- package/data/pages/Utilities/utilities/usesorting.json +0 -139
- package/data/pages/Utilities/utilities/usestatewithvalidation.json +0 -69
- package/data/pages/Utilities/utilities/usesum.json +0 -86
- package/data/pages/Utilities/utilities/usetableexport.json +0 -87
- package/data/pages/Utilities/utilities/usetableselection.json +0 -311
- package/data/pages/Utilities/utilities/usetimeout.json +0 -63
- package/data/pages/Utilities/utilities/usetoggle.json +0 -75
- package/data/pages/Utilities/utilities/usewindowresize.json +0 -63
- package/data/version.json +0 -4
- package/docs/content-schema.md +0 -147
- package/docs/navigation-inventory.json +0 -1310
- package/docs/search-synonyms.json +0 -43
- package/server/index.mjs +0 -268
- package/server/lib/load-docs.mjs +0 -48
- package/server/lib/normalise-doc.mjs +0 -220
- package/server/lib/render-markdown.mjs +0 -82
- package/server/lib/search-index.mjs +0 -49
- package/server/lib/types.js +0 -99
|
@@ -0,0 +1,1993 @@
|
|
|
1
|
+
# Select
|
|
2
|
+
|
|
3
|
+
*Category:* Components
|
|
4
|
+
*Section:* Selection
|
|
5
|
+
*Source:* https://uikit.developers.rio.cloud/#components/selects
|
|
6
|
+
*Captured:* 2025-12-12T12:38:28.158Z
|
|
7
|
+
|
|
8
|
+
The Select and Multiselect components are form controls and are intended to be used within forms. They are designed to be used instead of native HTML Select which cannot be styled and are rendered by each browser differently.
|
|
9
|
+
|
|
10
|
+
## Select
|
|
11
|
+
|
|
12
|
+
This component allows the selection of a single element from provided list.
|
|
13
|
+
|
|
14
|
+
### Example: Example 1
|
|
15
|
+
|
|
16
|
+
Notification callbackPlease selectOption 1
|
|
17
|
+
Option 2
|
|
18
|
+
Option 3
|
|
19
|
+
Option 4
|
|
20
|
+
Option 5
|
|
21
|
+
Option 6
|
|
22
|
+
Option 7
|
|
23
|
+
Option 8
|
|
24
|
+
Option 9
|
|
25
|
+
Option 10
|
|
26
|
+
|
|
27
|
+
with pre-selected itemOption 3Option 1
|
|
28
|
+
Option 2
|
|
29
|
+
Option 3
|
|
30
|
+
|
|
31
|
+
with disabled item and group headerPlease selectOption 1
|
|
32
|
+
Option 2
|
|
33
|
+
Header
|
|
34
|
+
Option 4
|
|
35
|
+
|
|
36
|
+
with filterTruckTruck
|
|
37
|
+
Van
|
|
38
|
+
Bus
|
|
39
|
+
|
|
40
|
+
with labelVehicle:TruckTruck
|
|
41
|
+
Van
|
|
42
|
+
Bus
|
|
43
|
+
|
|
44
|
+
with inputOption 3Option 1
|
|
45
|
+
Option 2
|
|
46
|
+
Option 3
|
|
47
|
+
|
|
48
|
+
with clear buttonOption 3Option 1
|
|
49
|
+
Option 2
|
|
50
|
+
Option 3
|
|
51
|
+
|
|
52
|
+
with "dropup"Option 3Option 1
|
|
53
|
+
Option 2
|
|
54
|
+
Option 3
|
|
55
|
+
|
|
56
|
+
DisabledPlease select
|
|
57
|
+
|
|
58
|
+
With icon rendered in an inputAddon
|
|
59
|
+
Please select
|
|
60
|
+
|
|
61
|
+
Option 1
|
|
62
|
+
Option 2
|
|
63
|
+
Option 3
|
|
64
|
+
Option 4
|
|
65
|
+
Option 5
|
|
66
|
+
Option 6
|
|
67
|
+
Option 7
|
|
68
|
+
Option 8
|
|
69
|
+
Option 9
|
|
70
|
+
Option 10
|
|
71
|
+
|
|
72
|
+
with truncated labelSelect with a very long label to demonstrate truncating inner text with ellipsisSelect with a very long label to demonstrate truncating inner text with ellipsis
|
|
73
|
+
Label 1
|
|
74
|
+
Label 2
|
|
75
|
+
|
|
76
|
+
with "pullRight" on small selectsOption 1Option 1
|
|
77
|
+
Option 2
|
|
78
|
+
Option 3 with a very long label for demonstration
|
|
79
|
+
|
|
80
|
+
Option 1Option 1
|
|
81
|
+
Option 2
|
|
82
|
+
Option 3 with a very long label for demonstration
|
|
83
|
+
|
|
84
|
+
with "pullRight" and "width-auto"Option 1Option 1
|
|
85
|
+
Option 2
|
|
86
|
+
Option 3 with a very long label for demonstration
|
|
87
|
+
|
|
88
|
+
with custom sizesOption 1Option 1
|
|
89
|
+
Option 2
|
|
90
|
+
Option 3
|
|
91
|
+
Option 4
|
|
92
|
+
|
|
93
|
+
Option 1Option 1
|
|
94
|
+
Option 2
|
|
95
|
+
Option 3
|
|
96
|
+
Option 4
|
|
97
|
+
|
|
98
|
+
Option 1Option 1
|
|
99
|
+
Option 2
|
|
100
|
+
Option 3
|
|
101
|
+
Option 4
|
|
102
|
+
|
|
103
|
+
with external error feedbackOption 3Option 1
|
|
104
|
+
Option 2
|
|
105
|
+
Option 3
|
|
106
|
+
|
|
107
|
+
This is an error message
|
|
108
|
+
with built-in error feedback
|
|
109
|
+
Option 3This is an error message
|
|
110
|
+
|
|
111
|
+
Option 1
|
|
112
|
+
Option 2
|
|
113
|
+
Option 3
|
|
114
|
+
|
|
115
|
+
with custom button classesOption 3Option 1
|
|
116
|
+
Option 2
|
|
117
|
+
Option 3
|
|
118
|
+
|
|
119
|
+
Option 3Option 1
|
|
120
|
+
Option 2
|
|
121
|
+
Option 3
|
|
122
|
+
|
|
123
|
+
Option 3Option 1
|
|
124
|
+
Option 2
|
|
125
|
+
Option 3
|
|
126
|
+
|
|
127
|
+
with icons onlyOption 1
|
|
128
|
+
Option 2
|
|
129
|
+
Option 3
|
|
130
|
+
Option 4
|
|
131
|
+
|
|
132
|
+
Option 1
|
|
133
|
+
Option 2
|
|
134
|
+
Option 3
|
|
135
|
+
Option 4
|
|
136
|
+
|
|
137
|
+
with loading spinnerPlease select
|
|
138
|
+
|
|
139
|
+
#### Summary
|
|
140
|
+
|
|
141
|
+
Notification callbackPlease selectOption 1
|
|
142
|
+
Option 2
|
|
143
|
+
Option 3
|
|
144
|
+
Option 4
|
|
145
|
+
Option 5
|
|
146
|
+
Option 6
|
|
147
|
+
Option 7
|
|
148
|
+
Option 8
|
|
149
|
+
Option 9
|
|
150
|
+
Option 10
|
|
151
|
+
|
|
152
|
+
with pre-selected itemOption 3Option 1
|
|
153
|
+
Option 2
|
|
154
|
+
Option 3
|
|
155
|
+
|
|
156
|
+
with disabled item and group headerPlease selectOption 1
|
|
157
|
+
Option 2
|
|
158
|
+
Header
|
|
159
|
+
Option 4
|
|
160
|
+
|
|
161
|
+
with filterTruckTruck
|
|
162
|
+
Van
|
|
163
|
+
Bus
|
|
164
|
+
|
|
165
|
+
with labelVehicle:TruckTruck
|
|
166
|
+
Van
|
|
167
|
+
Bus
|
|
168
|
+
|
|
169
|
+
with inputOption 3Option 1
|
|
170
|
+
Option 2
|
|
171
|
+
Option 3
|
|
172
|
+
|
|
173
|
+
with clear buttonOption 3Option 1
|
|
174
|
+
Option 2
|
|
175
|
+
Option 3
|
|
176
|
+
|
|
177
|
+
with "dropup"Option 3Option 1
|
|
178
|
+
Option 2
|
|
179
|
+
Option 3
|
|
180
|
+
|
|
181
|
+
DisabledPlease select
|
|
182
|
+
|
|
183
|
+
With icon rendered in an inputAddon
|
|
184
|
+
Please select
|
|
185
|
+
|
|
186
|
+
Option 1
|
|
187
|
+
Option 2
|
|
188
|
+
Option 3
|
|
189
|
+
Option 4
|
|
190
|
+
Option 5
|
|
191
|
+
Option 6
|
|
192
|
+
Option 7
|
|
193
|
+
Option 8
|
|
194
|
+
Option 9
|
|
195
|
+
Option 10
|
|
196
|
+
|
|
197
|
+
with truncated labelSelect with a very long label to demonstrate truncating inner text with ellipsisSelect with a very long label to demonstrate truncating inner text with ellipsis
|
|
198
|
+
Label 1
|
|
199
|
+
Label 2
|
|
200
|
+
|
|
201
|
+
with "pullRight" on small selectsOption 1Option 1
|
|
202
|
+
Option 2
|
|
203
|
+
Option 3 with a very long label for demonstration
|
|
204
|
+
|
|
205
|
+
Option 1Option 1
|
|
206
|
+
Option 2
|
|
207
|
+
Option 3 with a very long label for demonstration
|
|
208
|
+
|
|
209
|
+
with "pullRight" and "width-auto"Option 1Option 1
|
|
210
|
+
Option 2
|
|
211
|
+
Option 3 with a very long label for demonstration
|
|
212
|
+
|
|
213
|
+
with custom sizesOption 1Option 1
|
|
214
|
+
Option 2
|
|
215
|
+
Option 3
|
|
216
|
+
Option 4
|
|
217
|
+
|
|
218
|
+
Option 1Option 1
|
|
219
|
+
Option 2
|
|
220
|
+
Option 3
|
|
221
|
+
Option 4
|
|
222
|
+
|
|
223
|
+
Option 1Option 1
|
|
224
|
+
Option 2
|
|
225
|
+
Option 3
|
|
226
|
+
Option 4
|
|
227
|
+
|
|
228
|
+
with external error feedbackOption 3Option 1
|
|
229
|
+
Option 2
|
|
230
|
+
Option 3
|
|
231
|
+
|
|
232
|
+
This is an error message
|
|
233
|
+
with built-in error feedback
|
|
234
|
+
Option 3This is an error message
|
|
235
|
+
|
|
236
|
+
Option 1
|
|
237
|
+
Option 2
|
|
238
|
+
Option 3
|
|
239
|
+
|
|
240
|
+
with custom button classesOption 3Option 1
|
|
241
|
+
Option 2
|
|
242
|
+
Option 3
|
|
243
|
+
|
|
244
|
+
Option 3Option 1
|
|
245
|
+
Option 2
|
|
246
|
+
Option 3
|
|
247
|
+
|
|
248
|
+
Option 3Option 1
|
|
249
|
+
Option 2
|
|
250
|
+
Option 3
|
|
251
|
+
|
|
252
|
+
with icons onlyOption 1
|
|
253
|
+
Option 2
|
|
254
|
+
Option 3
|
|
255
|
+
Option 4
|
|
256
|
+
|
|
257
|
+
Option 1
|
|
258
|
+
Option 2
|
|
259
|
+
Option 3
|
|
260
|
+
Option 4
|
|
261
|
+
|
|
262
|
+
with loading spinnerPlease select
|
|
263
|
+
|
|
264
|
+
#### React (tsx)
|
|
265
|
+
|
|
266
|
+
```tsx
|
|
267
|
+
import Select from '@rio-cloud/rio-uikit/Select';
|
|
268
|
+
import Notification from '@rio-cloud/rio-uikit/Notification';
|
|
269
|
+
|
|
270
|
+
const options1 = [
|
|
271
|
+
{ id: '1', label: 'Option 1' },
|
|
272
|
+
{ id: '2', label: 'Option 2' },
|
|
273
|
+
{ id: '3', label: 'Option 3' },
|
|
274
|
+
{ id: '4', label: 'Option 4' },
|
|
275
|
+
{ id: '5', label: 'Option 5' },
|
|
276
|
+
{ id: '6', label: 'Option 6' },
|
|
277
|
+
{ id: '7', label: 'Option 7' },
|
|
278
|
+
{ id: '8', label: 'Option 8' },
|
|
279
|
+
{ id: '9', label: 'Option 9' },
|
|
280
|
+
{ id: '10', label: 'Option 10' },
|
|
281
|
+
];
|
|
282
|
+
|
|
283
|
+
const options2 = [
|
|
284
|
+
{ id: '1', label: 'Option 1' },
|
|
285
|
+
{ id: '2', label: 'Option 2' },
|
|
286
|
+
{ id: '3', label: 'Option 3', selected: true },
|
|
287
|
+
];
|
|
288
|
+
|
|
289
|
+
const options3 = [
|
|
290
|
+
{ id: '1', label: 'Option 1' },
|
|
291
|
+
{ id: '2', label: 'Option 2', disabled: true },
|
|
292
|
+
{ id: '3', label: 'Header', header: true },
|
|
293
|
+
{ id: '4', label: 'Option 4' },
|
|
294
|
+
];
|
|
295
|
+
|
|
296
|
+
const options4 = [
|
|
297
|
+
{
|
|
298
|
+
id: '1',
|
|
299
|
+
label: <span>Truck</span>,
|
|
300
|
+
selected: true,
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
id: '2',
|
|
304
|
+
label: <span>Van</span>,
|
|
305
|
+
selected: false,
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
id: '3',
|
|
309
|
+
label: <span>Bus</span>,
|
|
310
|
+
selected: false,
|
|
311
|
+
},
|
|
312
|
+
];
|
|
313
|
+
|
|
314
|
+
const options5 = [
|
|
315
|
+
{
|
|
316
|
+
id: '1',
|
|
317
|
+
label: 'Option 1',
|
|
318
|
+
icon: <span className='rioglyph rioglyph-status-available text-color-status-available' />,
|
|
319
|
+
selected: true,
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
id: '2',
|
|
323
|
+
label: 'Option 2',
|
|
324
|
+
icon: <span className='rioglyph rioglyph-status-driving text-color-status-driving' />,
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
id: '3',
|
|
328
|
+
label: 'Option 3',
|
|
329
|
+
icon: <span className='rioglyph rioglyph-status-resting text-color-status-resting' />,
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
id: '4',
|
|
333
|
+
label: 'Option 4',
|
|
334
|
+
icon: <span className='rioglyph rioglyph-status-working text-color-status-working' />,
|
|
335
|
+
},
|
|
336
|
+
];
|
|
337
|
+
|
|
338
|
+
const options6 = [
|
|
339
|
+
{ id: '1', label: 'Option 1', selected: true },
|
|
340
|
+
{ id: '2', label: 'Option 2' },
|
|
341
|
+
{ id: '3', label: 'Option 3 with a very long label for demonstration' },
|
|
342
|
+
];
|
|
343
|
+
|
|
344
|
+
const options7 = [
|
|
345
|
+
{
|
|
346
|
+
id: '1',
|
|
347
|
+
label: 'Select with a very long label to demonstrate truncating inner text with ellipsis',
|
|
348
|
+
selected: true,
|
|
349
|
+
foo: 'bar',
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
id: '2',
|
|
353
|
+
label: 'Label 1',
|
|
354
|
+
selected: false,
|
|
355
|
+
foo: 'bar',
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
id: '3',
|
|
359
|
+
label: 'Label 2',
|
|
360
|
+
selected: false,
|
|
361
|
+
foo: 'bar',
|
|
362
|
+
},
|
|
363
|
+
];
|
|
364
|
+
|
|
365
|
+
export default () => (
|
|
366
|
+
<div>
|
|
367
|
+
<div className='row'>
|
|
368
|
+
<div className='col-12 col-sm-4 form-group'>
|
|
369
|
+
<label htmlFor='1'>Notification callback</label>
|
|
370
|
+
<Select
|
|
371
|
+
id='1'
|
|
372
|
+
placeholder='Please select'
|
|
373
|
+
options={options1}
|
|
374
|
+
onChange={item => Notification.info(item?.label)}
|
|
375
|
+
className='test-className'
|
|
376
|
+
btnClassName='test-btnClassName'
|
|
377
|
+
dropdownClassName='test-dropdownClassName max-width-100pct'
|
|
378
|
+
/>
|
|
379
|
+
</div>
|
|
380
|
+
<div className='col-12 col-sm-4 form-group'>
|
|
381
|
+
<label htmlFor='2'>with pre-selected item</label>
|
|
382
|
+
<Select id='2' options={options2} onChange={item => Notification.info(item?.label)} />
|
|
383
|
+
</div>
|
|
384
|
+
<div className='col-xs-12 col-sm-4 form-group'>
|
|
385
|
+
<label htmlFor='3'>with disabled item and group header</label>
|
|
386
|
+
<Select id='3' placeholder='Please select' options={options3} />
|
|
387
|
+
</div>
|
|
388
|
+
</div>
|
|
389
|
+
|
|
390
|
+
<div className='row'>
|
|
391
|
+
<div className='col-12 col-sm-4 form-group'>
|
|
392
|
+
<label htmlFor='4'>with filter</label>
|
|
393
|
+
<Select id='4' placeholder='Please select' options={options4} useFilter noItemMessage='Nothing found' />
|
|
394
|
+
</div>
|
|
395
|
+
<div className='col-12 col-sm-4 form-group'>
|
|
396
|
+
<label htmlFor='5'>with label</label>
|
|
397
|
+
<Select id='5' placeholder='Please select' options={options4} label='Vehicle' />
|
|
398
|
+
</div>
|
|
399
|
+
<div className='col-xs-12 col-sm-4 form-group'>
|
|
400
|
+
<label htmlFor='6'>with input</label>
|
|
401
|
+
<div className='input-group'>
|
|
402
|
+
<div className='input-group-btn'>
|
|
403
|
+
<Select id='6' options={options2} />
|
|
404
|
+
</div>
|
|
405
|
+
<input className='form-control margin-left--1' defaultValue='12345-6789' />
|
|
406
|
+
</div>
|
|
407
|
+
</div>
|
|
408
|
+
<div className='col-12 col-sm-4 form-group'>
|
|
409
|
+
<label htmlFor='7'>with clear button</label>
|
|
410
|
+
<Select
|
|
411
|
+
id='7'
|
|
412
|
+
placeholder='Please select'
|
|
413
|
+
options={options2}
|
|
414
|
+
onChange={item => Notification.info(item ? item.label : 'cleared')}
|
|
415
|
+
useClear
|
|
416
|
+
/>
|
|
417
|
+
</div>
|
|
418
|
+
<div className='col-12 col-sm-4 form-group'>
|
|
419
|
+
<label htmlFor='8'>with "dropup"</label>
|
|
420
|
+
<Select id='8' placeholder='Please select' options={options2} dropup />
|
|
421
|
+
</div>
|
|
422
|
+
<div className='col-12 col-sm-4 form-group'>
|
|
423
|
+
<label htmlFor='9'>Disabled</label>
|
|
424
|
+
<Select id='9' placeholder='Please select' disabled options={[]} />
|
|
425
|
+
</div>
|
|
426
|
+
|
|
427
|
+
<div className='col-12 col-sm-4 form-group'>
|
|
428
|
+
<label htmlFor='20'>With icon rendered in an inputAddon</label>
|
|
429
|
+
<Select
|
|
430
|
+
id='20'
|
|
431
|
+
placeholder='Please select'
|
|
432
|
+
inputAddon='rioglyph rioglyph-load'
|
|
433
|
+
options={options1}
|
|
434
|
+
useFilter
|
|
435
|
+
/>
|
|
436
|
+
</div>
|
|
437
|
+
</div>
|
|
438
|
+
<hr />
|
|
439
|
+
|
|
440
|
+
<div className='row'>
|
|
441
|
+
<div className='col-12 col-sm-4 form-group'>
|
|
442
|
+
<label htmlFor='10'>with truncated label</label>
|
|
443
|
+
<Select id='10' placeholder='Please select' options={options7} />
|
|
444
|
+
</div>
|
|
445
|
+
<div className='col-12 col-sm-8 display-flex flex-wrap justify-content-end gap-10'>
|
|
446
|
+
<div>
|
|
447
|
+
<label htmlFor='11'>with "pullRight" on small selects</label>
|
|
448
|
+
<div className='display-flex gap-10 align-items-end'>
|
|
449
|
+
<div className='form-group'>
|
|
450
|
+
<Select id='11' placeholder='Please select' options={options6} pullRight />
|
|
451
|
+
</div>
|
|
452
|
+
<div className='form-group'>
|
|
453
|
+
<Select id='12' placeholder='Please select' options={options6} dropup pullRight />
|
|
454
|
+
</div>
|
|
455
|
+
</div>
|
|
456
|
+
</div>
|
|
457
|
+
<div>
|
|
458
|
+
<label htmlFor='13'>with "pullRight" and "width-auto"</label>
|
|
459
|
+
<div className='form-group'>
|
|
460
|
+
<Select
|
|
461
|
+
id='13'
|
|
462
|
+
placeholder='Please select'
|
|
463
|
+
options={options6}
|
|
464
|
+
pullRight
|
|
465
|
+
dropdownClassName='width-auto'
|
|
466
|
+
/>
|
|
467
|
+
</div>
|
|
468
|
+
</div>
|
|
469
|
+
</div>
|
|
470
|
+
</div>
|
|
471
|
+
<hr />
|
|
472
|
+
|
|
473
|
+
<div className='form-group'>
|
|
474
|
+
<label htmlFor='14'>with custom sizes</label>
|
|
475
|
+
<div className='display-flex gap-10 align-items-end'>
|
|
476
|
+
<div className='form-group'>
|
|
477
|
+
<Select id='14' bsSize='lg' options={options5} />
|
|
478
|
+
</div>
|
|
479
|
+
<div className='form-group'>
|
|
480
|
+
<Select options={options5} />
|
|
481
|
+
</div>
|
|
482
|
+
<div className='form-group'>
|
|
483
|
+
<Select bsSize='sm' options={options5} />
|
|
484
|
+
</div>
|
|
485
|
+
</div>
|
|
486
|
+
</div>
|
|
487
|
+
<hr />
|
|
488
|
+
|
|
489
|
+
<div className='form-group has-error has-feedback max-width-400'>
|
|
490
|
+
<label htmlFor='15'>with external error feedback</label>
|
|
491
|
+
<Select id='15' options={options2} hasError />
|
|
492
|
+
<span className='form-control-feedback rioglyph rioglyph-error-sign' />
|
|
493
|
+
<span className='help-block'>
|
|
494
|
+
<span>This is an error message</span>
|
|
495
|
+
</span>
|
|
496
|
+
</div>
|
|
497
|
+
<hr />
|
|
498
|
+
|
|
499
|
+
<div className='max-width-400'>
|
|
500
|
+
<label htmlFor='18'>with built-in error feedback</label>
|
|
501
|
+
<Select
|
|
502
|
+
id='18'
|
|
503
|
+
options={options2}
|
|
504
|
+
inputAddon='rioglyph rioglyph-robot'
|
|
505
|
+
errorMessage='This is an error message'
|
|
506
|
+
/>
|
|
507
|
+
</div>
|
|
508
|
+
<hr />
|
|
509
|
+
|
|
510
|
+
<div className='form-group'>
|
|
511
|
+
<label htmlFor='16'>with custom button classes</label>
|
|
512
|
+
<div className='form-inline'>
|
|
513
|
+
<div className='form-group'>
|
|
514
|
+
<Select
|
|
515
|
+
id='16'
|
|
516
|
+
bsSize='lg'
|
|
517
|
+
options={options2}
|
|
518
|
+
className='shadow-none'
|
|
519
|
+
btnClassName='btn btn-link height-auto padding-0 focus-shadow-none hover-bg-none'
|
|
520
|
+
/>
|
|
521
|
+
</div>
|
|
522
|
+
<div className='form-group'>
|
|
523
|
+
<Select
|
|
524
|
+
options={options2}
|
|
525
|
+
className='shadow-none'
|
|
526
|
+
btnClassName='btn btn-link height-auto padding-0 focus-shadow-none hover-bg-none'
|
|
527
|
+
/>
|
|
528
|
+
</div>
|
|
529
|
+
<div className='form-group'>
|
|
530
|
+
<Select
|
|
531
|
+
bsSize='sm'
|
|
532
|
+
options={options2}
|
|
533
|
+
className='shadow-none'
|
|
534
|
+
btnClassName='btn btn-link height-auto padding-0 focus-shadow-none hover-bg-none'
|
|
535
|
+
/>
|
|
536
|
+
</div>
|
|
537
|
+
</div>
|
|
538
|
+
</div>
|
|
539
|
+
<hr />
|
|
540
|
+
|
|
541
|
+
<div className='form-group'>
|
|
542
|
+
<label htmlFor='17'>with icons only</label>
|
|
543
|
+
<div className='form-inline'>
|
|
544
|
+
<div className='form-group'>
|
|
545
|
+
<Select id='17' options={options5} placeholder='Please select' showSelectedItemIcon />
|
|
546
|
+
</div>
|
|
547
|
+
<div className='form-group'>
|
|
548
|
+
<Select options={options5} showSelectedItemIcon showUnselectedItemIcons />
|
|
549
|
+
</div>
|
|
550
|
+
</div>
|
|
551
|
+
</div>
|
|
552
|
+
|
|
553
|
+
<div className='form-group'>
|
|
554
|
+
<label htmlFor='18'>with loading spinner</label>
|
|
555
|
+
<div className='form-inline'>
|
|
556
|
+
<div className='form-group'>
|
|
557
|
+
<Select id='18' options={options1} placeholder='Please select' isLoading />
|
|
558
|
+
</div>
|
|
559
|
+
</div>
|
|
560
|
+
</div>
|
|
561
|
+
</div>
|
|
562
|
+
);
|
|
563
|
+
```
|
|
564
|
+
|
|
565
|
+
#### HTML (html)
|
|
566
|
+
|
|
567
|
+
```html
|
|
568
|
+
<div>
|
|
569
|
+
<div class="row">
|
|
570
|
+
<div class="col-12 col-sm-4 form-group">
|
|
571
|
+
<label for="1">Notification callback</label>
|
|
572
|
+
<div class="select dropdown test-className">
|
|
573
|
+
<button type="button" id="1" class="dropdown-toggle form-control text-left test-btnClassName" data-toggle="dropdown" tabindex="0" aria-haspopup="true" aria-expanded="false">
|
|
574
|
+
<span class="selected-option-text">
|
|
575
|
+
<span class="placeholder">Please select</span>
|
|
576
|
+
</span>
|
|
577
|
+
<span class="clearButton hide pointer-events-none">
|
|
578
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
579
|
+
</span>
|
|
580
|
+
</span>
|
|
581
|
+
<span class="caret">
|
|
582
|
+
</span>
|
|
583
|
+
</button>
|
|
584
|
+
<ul class="dropdown-menu test-dropdownClassName max-width-100pct" role="menu">
|
|
585
|
+
<li class="" role="listitem">
|
|
586
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="1" data-item-index="0">
|
|
587
|
+
<span class="selected-option-dropdown-item">Option 1</span>
|
|
588
|
+
<input type="hidden" value="1">
|
|
589
|
+
</a>
|
|
590
|
+
</li>
|
|
591
|
+
<li class="" role="listitem">
|
|
592
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="2" data-item-index="1">
|
|
593
|
+
<span class="selected-option-dropdown-item">Option 2</span>
|
|
594
|
+
<input type="hidden" value="2">
|
|
595
|
+
</a>
|
|
596
|
+
</li>
|
|
597
|
+
<li class="" role="listitem">
|
|
598
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="3" data-item-index="2">
|
|
599
|
+
<span class="selected-option-dropdown-item">Option 3</span>
|
|
600
|
+
<input type="hidden" value="3">
|
|
601
|
+
</a>
|
|
602
|
+
</li>
|
|
603
|
+
<li class="" role="listitem">
|
|
604
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="4" data-item-index="3">
|
|
605
|
+
<span class="selected-option-dropdown-item">Option 4</span>
|
|
606
|
+
<input type="hidden" value="4">
|
|
607
|
+
</a>
|
|
608
|
+
</li>
|
|
609
|
+
<li class="" role="listitem">
|
|
610
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="5" data-item-index="4">
|
|
611
|
+
<span class="selected-option-dropdown-item">Option 5</span>
|
|
612
|
+
<input type="hidden" value="5">
|
|
613
|
+
</a>
|
|
614
|
+
</li>
|
|
615
|
+
<li class="" role="listitem">
|
|
616
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="6" data-item-index="5">
|
|
617
|
+
<span class="selected-option-dropdown-item">Option 6</span>
|
|
618
|
+
<input type="hidden" value="6">
|
|
619
|
+
</a>
|
|
620
|
+
</li>
|
|
621
|
+
<li class="" role="listitem">
|
|
622
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="7" data-item-index="6">
|
|
623
|
+
<span class="selected-option-dropdown-item">Option 7</span>
|
|
624
|
+
<input type="hidden" value="7">
|
|
625
|
+
</a>
|
|
626
|
+
</li>
|
|
627
|
+
<li class="" role="listitem">
|
|
628
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="8" data-item-index="7">
|
|
629
|
+
<span class="selected-option-dropdown-item">Option 8</span>
|
|
630
|
+
<input type="hidden" value="8">
|
|
631
|
+
</a>
|
|
632
|
+
</li>
|
|
633
|
+
<li class="" role="listitem">
|
|
634
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="9" data-item-index="8">
|
|
635
|
+
<span class="selected-option-dropdown-item">Option 9</span>
|
|
636
|
+
<input type="hidden" value="9">
|
|
637
|
+
</a>
|
|
638
|
+
</li>
|
|
639
|
+
<li class="" role="listitem">
|
|
640
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="10" data-item-index="9">
|
|
641
|
+
<span class="selected-option-dropdown-item">Option 10</span>
|
|
642
|
+
<input type="hidden" value="10">
|
|
643
|
+
</a>
|
|
644
|
+
</li>
|
|
645
|
+
</ul>
|
|
646
|
+
</div>
|
|
647
|
+
</div>
|
|
648
|
+
<div class="col-12 col-sm-4 form-group">
|
|
649
|
+
<label for="2">with pre-selected item</label>
|
|
650
|
+
<div class="select dropdown">
|
|
651
|
+
<button type="button" id="2" class="dropdown-toggle form-control text-left" data-toggle="dropdown" tabindex="0" aria-haspopup="true" aria-expanded="false">
|
|
652
|
+
<span class="selected-option-text">Option 3</span>
|
|
653
|
+
<span class="clearButton hide pointer-events-none">
|
|
654
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
655
|
+
</span>
|
|
656
|
+
</span>
|
|
657
|
+
<span class="caret">
|
|
658
|
+
</span>
|
|
659
|
+
</button>
|
|
660
|
+
<ul class="dropdown-menu" role="menu">
|
|
661
|
+
<li class="" role="listitem">
|
|
662
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="1" data-item-index="0">
|
|
663
|
+
<span class="selected-option-dropdown-item">Option 1</span>
|
|
664
|
+
<input type="hidden" value="1">
|
|
665
|
+
</a>
|
|
666
|
+
</li>
|
|
667
|
+
<li class="" role="listitem">
|
|
668
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="2" data-item-index="1">
|
|
669
|
+
<span class="selected-option-dropdown-item">Option 2</span>
|
|
670
|
+
<input type="hidden" value="2">
|
|
671
|
+
</a>
|
|
672
|
+
</li>
|
|
673
|
+
<li class="" role="listitem">
|
|
674
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="3" data-item-index="2">
|
|
675
|
+
<span class="selected-option-dropdown-item">Option 3</span>
|
|
676
|
+
<input type="hidden" value="3">
|
|
677
|
+
</a>
|
|
678
|
+
</li>
|
|
679
|
+
</ul>
|
|
680
|
+
</div>
|
|
681
|
+
</div>
|
|
682
|
+
<div class="col-xs-12 col-sm-4 form-group">
|
|
683
|
+
<label for="3">with disabled item and group header</label>
|
|
684
|
+
<div class="select dropdown">
|
|
685
|
+
<button type="button" id="3" class="dropdown-toggle form-control text-left" data-toggle="dropdown" tabindex="0" aria-haspopup="true" aria-expanded="false">
|
|
686
|
+
<span class="selected-option-text">
|
|
687
|
+
<span class="placeholder">Please select</span>
|
|
688
|
+
</span>
|
|
689
|
+
<span class="clearButton hide pointer-events-none">
|
|
690
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
691
|
+
</span>
|
|
692
|
+
</span>
|
|
693
|
+
<span class="caret">
|
|
694
|
+
</span>
|
|
695
|
+
</button>
|
|
696
|
+
<ul class="dropdown-menu" role="menu">
|
|
697
|
+
<li class="" role="listitem">
|
|
698
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="1" data-item-index="0">
|
|
699
|
+
<span class="selected-option-dropdown-item">Option 1</span>
|
|
700
|
+
<input type="hidden" value="1">
|
|
701
|
+
</a>
|
|
702
|
+
</li>
|
|
703
|
+
<li class="disabled" role="listitem">
|
|
704
|
+
<a role="menuitem" class="pointer-events-none display-flex align-items-center gap-3" data-item-id="2" data-item-index="1">
|
|
705
|
+
<span class="selected-option-dropdown-item">Option 2</span>
|
|
706
|
+
<input type="hidden" value="2">
|
|
707
|
+
</a>
|
|
708
|
+
</li>
|
|
709
|
+
<li class="dropdown-header center ">
|
|
710
|
+
<span class="dropdown-header-text">Header</span>
|
|
711
|
+
</li>
|
|
712
|
+
<li class="" role="listitem">
|
|
713
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="4" data-item-index="3">
|
|
714
|
+
<span class="selected-option-dropdown-item">Option 4</span>
|
|
715
|
+
<input type="hidden" value="4">
|
|
716
|
+
</a>
|
|
717
|
+
</li>
|
|
718
|
+
</ul>
|
|
719
|
+
</div>
|
|
720
|
+
</div>
|
|
721
|
+
</div>
|
|
722
|
+
<div class="row">
|
|
723
|
+
<div class="col-12 col-sm-4 form-group">
|
|
724
|
+
<label for="4">with filter</label>
|
|
725
|
+
<div class="select dropdown">
|
|
726
|
+
<button type="button" id="4" class="dropdown-toggle form-control text-left" data-toggle="dropdown" tabindex="0" aria-haspopup="true" aria-expanded="false">
|
|
727
|
+
<span class="selected-option-text">
|
|
728
|
+
<span>Truck</span>
|
|
729
|
+
</span>
|
|
730
|
+
<span class="clearButton hide pointer-events-none">
|
|
731
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
732
|
+
</span>
|
|
733
|
+
</span>
|
|
734
|
+
<span class="caret">
|
|
735
|
+
</span>
|
|
736
|
+
</button>
|
|
737
|
+
<ul class="dropdown-menu" role="menu">
|
|
738
|
+
<li class="" role="listitem">
|
|
739
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="1" data-item-index="0">
|
|
740
|
+
<span class="selected-option-dropdown-item">
|
|
741
|
+
<span>Truck</span>
|
|
742
|
+
</span>
|
|
743
|
+
<input type="hidden" value="1">
|
|
744
|
+
</a>
|
|
745
|
+
</li>
|
|
746
|
+
<li class="" role="listitem">
|
|
747
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="2" data-item-index="1">
|
|
748
|
+
<span class="selected-option-dropdown-item">
|
|
749
|
+
<span>Van</span>
|
|
750
|
+
</span>
|
|
751
|
+
<input type="hidden" value="2">
|
|
752
|
+
</a>
|
|
753
|
+
</li>
|
|
754
|
+
<li class="" role="listitem">
|
|
755
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="3" data-item-index="2">
|
|
756
|
+
<span class="selected-option-dropdown-item">
|
|
757
|
+
<span>Bus</span>
|
|
758
|
+
</span>
|
|
759
|
+
<input type="hidden" value="3">
|
|
760
|
+
</a>
|
|
761
|
+
</li>
|
|
762
|
+
</ul>
|
|
763
|
+
</div>
|
|
764
|
+
</div>
|
|
765
|
+
<div class="col-12 col-sm-4 form-group">
|
|
766
|
+
<label for="5">with label</label>
|
|
767
|
+
<div class="select dropdown">
|
|
768
|
+
<button type="button" id="5" class="dropdown-toggle form-control text-left" data-toggle="dropdown" tabindex="0" aria-haspopup="true" aria-expanded="false">
|
|
769
|
+
<span class="selected-option-text">
|
|
770
|
+
<span class="selected-option-text-label">Vehicle:</span>
|
|
771
|
+
<span>Truck</span>
|
|
772
|
+
</span>
|
|
773
|
+
<span class="clearButton hide pointer-events-none">
|
|
774
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
775
|
+
</span>
|
|
776
|
+
</span>
|
|
777
|
+
<span class="caret">
|
|
778
|
+
</span>
|
|
779
|
+
</button>
|
|
780
|
+
<ul class="dropdown-menu" role="menu">
|
|
781
|
+
<li class="" role="listitem">
|
|
782
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="1" data-item-index="0">
|
|
783
|
+
<span class="selected-option-dropdown-item">
|
|
784
|
+
<span>Truck</span>
|
|
785
|
+
</span>
|
|
786
|
+
<input type="hidden" value="1">
|
|
787
|
+
</a>
|
|
788
|
+
</li>
|
|
789
|
+
<li class="" role="listitem">
|
|
790
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="2" data-item-index="1">
|
|
791
|
+
<span class="selected-option-dropdown-item">
|
|
792
|
+
<span>Van</span>
|
|
793
|
+
</span>
|
|
794
|
+
<input type="hidden" value="2">
|
|
795
|
+
</a>
|
|
796
|
+
</li>
|
|
797
|
+
<li class="" role="listitem">
|
|
798
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="3" data-item-index="2">
|
|
799
|
+
<span class="selected-option-dropdown-item">
|
|
800
|
+
<span>Bus</span>
|
|
801
|
+
</span>
|
|
802
|
+
<input type="hidden" value="3">
|
|
803
|
+
</a>
|
|
804
|
+
</li>
|
|
805
|
+
</ul>
|
|
806
|
+
</div>
|
|
807
|
+
</div>
|
|
808
|
+
<div class="col-xs-12 col-sm-4 form-group">
|
|
809
|
+
<label for="6">with input</label>
|
|
810
|
+
<div class="input-group">
|
|
811
|
+
<div class="input-group-btn">
|
|
812
|
+
<div class="select dropdown">
|
|
813
|
+
<button type="button" id="6" class="dropdown-toggle form-control text-left" data-toggle="dropdown" tabindex="0" aria-haspopup="true" aria-expanded="false">
|
|
814
|
+
<span class="selected-option-text">Option 3</span>
|
|
815
|
+
<span class="clearButton hide pointer-events-none">
|
|
816
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
817
|
+
</span>
|
|
818
|
+
</span>
|
|
819
|
+
<span class="caret">
|
|
820
|
+
</span>
|
|
821
|
+
</button>
|
|
822
|
+
<ul class="dropdown-menu" role="menu">
|
|
823
|
+
<li class="" role="listitem">
|
|
824
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="1" data-item-index="0">
|
|
825
|
+
<span class="selected-option-dropdown-item">Option 1</span>
|
|
826
|
+
<input type="hidden" value="1">
|
|
827
|
+
</a>
|
|
828
|
+
</li>
|
|
829
|
+
<li class="" role="listitem">
|
|
830
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="2" data-item-index="1">
|
|
831
|
+
<span class="selected-option-dropdown-item">Option 2</span>
|
|
832
|
+
<input type="hidden" value="2">
|
|
833
|
+
</a>
|
|
834
|
+
</li>
|
|
835
|
+
<li class="" role="listitem">
|
|
836
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="3" data-item-index="2">
|
|
837
|
+
<span class="selected-option-dropdown-item">Option 3</span>
|
|
838
|
+
<input type="hidden" value="3">
|
|
839
|
+
</a>
|
|
840
|
+
</li>
|
|
841
|
+
</ul>
|
|
842
|
+
</div>
|
|
843
|
+
</div>
|
|
844
|
+
<input class="form-control margin-left--1" value="12345-6789">
|
|
845
|
+
</div>
|
|
846
|
+
</div>
|
|
847
|
+
<div class="col-12 col-sm-4 form-group">
|
|
848
|
+
<label for="7">with clear button</label>
|
|
849
|
+
<div class="select dropdown">
|
|
850
|
+
<button type="button" id="7" class="dropdown-toggle form-control text-left" data-toggle="dropdown" tabindex="0" aria-haspopup="true" aria-expanded="false">
|
|
851
|
+
<span class="selected-option-text">Option 3</span>
|
|
852
|
+
<span class="clearButton">
|
|
853
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
854
|
+
</span>
|
|
855
|
+
</span>
|
|
856
|
+
<span class="caret">
|
|
857
|
+
</span>
|
|
858
|
+
</button>
|
|
859
|
+
<ul class="dropdown-menu" role="menu">
|
|
860
|
+
<li class="" role="listitem">
|
|
861
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="1" data-item-index="0">
|
|
862
|
+
<span class="selected-option-dropdown-item">Option 1</span>
|
|
863
|
+
<input type="hidden" value="1">
|
|
864
|
+
</a>
|
|
865
|
+
</li>
|
|
866
|
+
<li class="" role="listitem">
|
|
867
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="2" data-item-index="1">
|
|
868
|
+
<span class="selected-option-dropdown-item">Option 2</span>
|
|
869
|
+
<input type="hidden" value="2">
|
|
870
|
+
</a>
|
|
871
|
+
</li>
|
|
872
|
+
<li class="" role="listitem">
|
|
873
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="3" data-item-index="2">
|
|
874
|
+
<span class="selected-option-dropdown-item">Option 3</span>
|
|
875
|
+
<input type="hidden" value="3">
|
|
876
|
+
</a>
|
|
877
|
+
</li>
|
|
878
|
+
</ul>
|
|
879
|
+
</div>
|
|
880
|
+
</div>
|
|
881
|
+
<div class="col-12 col-sm-4 form-group">
|
|
882
|
+
<label for="8">with "dropup"</label>
|
|
883
|
+
<div class="select dropdown dropup">
|
|
884
|
+
<button type="button" id="8" class="dropdown-toggle form-control text-left" data-toggle="dropdown" tabindex="0" aria-haspopup="true" aria-expanded="false">
|
|
885
|
+
<span class="selected-option-text">Option 3</span>
|
|
886
|
+
<span class="clearButton hide pointer-events-none">
|
|
887
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
888
|
+
</span>
|
|
889
|
+
</span>
|
|
890
|
+
<span class="caret">
|
|
891
|
+
</span>
|
|
892
|
+
</button>
|
|
893
|
+
<ul class="dropdown-menu" role="menu">
|
|
894
|
+
<li class="" role="listitem">
|
|
895
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="1" data-item-index="0">
|
|
896
|
+
<span class="selected-option-dropdown-item">Option 1</span>
|
|
897
|
+
<input type="hidden" value="1">
|
|
898
|
+
</a>
|
|
899
|
+
</li>
|
|
900
|
+
<li class="" role="listitem">
|
|
901
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="2" data-item-index="1">
|
|
902
|
+
<span class="selected-option-dropdown-item">Option 2</span>
|
|
903
|
+
<input type="hidden" value="2">
|
|
904
|
+
</a>
|
|
905
|
+
</li>
|
|
906
|
+
<li class="" role="listitem">
|
|
907
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="3" data-item-index="2">
|
|
908
|
+
<span class="selected-option-dropdown-item">Option 3</span>
|
|
909
|
+
<input type="hidden" value="3">
|
|
910
|
+
</a>
|
|
911
|
+
</li>
|
|
912
|
+
</ul>
|
|
913
|
+
</div>
|
|
914
|
+
</div>
|
|
915
|
+
<div class="col-12 col-sm-4 form-group">
|
|
916
|
+
<label for="9">Disabled</label>
|
|
917
|
+
<div class="select dropdown">
|
|
918
|
+
<button type="button" id="9" class="dropdown-toggle form-control text-left disabled" data-toggle="dropdown" tabindex="0" aria-haspopup="true" aria-expanded="false">
|
|
919
|
+
<span class="selected-option-text">
|
|
920
|
+
<span class="placeholder">Please select</span>
|
|
921
|
+
</span>
|
|
922
|
+
<span class="clearButton hide pointer-events-none">
|
|
923
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
924
|
+
</span>
|
|
925
|
+
</span>
|
|
926
|
+
<span class="caret">
|
|
927
|
+
</span>
|
|
928
|
+
</button>
|
|
929
|
+
</div>
|
|
930
|
+
</div>
|
|
931
|
+
<div class="col-12 col-sm-4 form-group">
|
|
932
|
+
<label for="20">With icon rendered in an inputAddon</label>
|
|
933
|
+
<div class="select dropdown dropup">
|
|
934
|
+
<div class="form-group margin-bottom-0">
|
|
935
|
+
<div class="input-group">
|
|
936
|
+
<div class="input-group-addon">
|
|
937
|
+
<span class="rioglyph rioglyph-load">
|
|
938
|
+
</span>
|
|
939
|
+
</div>
|
|
940
|
+
<div class="form-control-feedback-wrapper">
|
|
941
|
+
<button type="button" id="20" class="dropdown-toggle form-control text-left" data-toggle="dropdown" tabindex="0" aria-haspopup="true" aria-expanded="false">
|
|
942
|
+
<span class="selected-option-text">
|
|
943
|
+
<span class="placeholder">Please select</span>
|
|
944
|
+
</span>
|
|
945
|
+
<span class="clearButton hide pointer-events-none">
|
|
946
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
947
|
+
</span>
|
|
948
|
+
</span>
|
|
949
|
+
<span class="caret">
|
|
950
|
+
</span>
|
|
951
|
+
</button>
|
|
952
|
+
</div>
|
|
953
|
+
</div>
|
|
954
|
+
</div>
|
|
955
|
+
<ul class="dropdown-menu" role="menu">
|
|
956
|
+
<li class="" role="listitem">
|
|
957
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="1" data-item-index="0">
|
|
958
|
+
<span class="selected-option-dropdown-item">Option 1</span>
|
|
959
|
+
<input type="hidden" value="1">
|
|
960
|
+
</a>
|
|
961
|
+
</li>
|
|
962
|
+
<li class="" role="listitem">
|
|
963
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="2" data-item-index="1">
|
|
964
|
+
<span class="selected-option-dropdown-item">Option 2</span>
|
|
965
|
+
<input type="hidden" value="2">
|
|
966
|
+
</a>
|
|
967
|
+
</li>
|
|
968
|
+
<li class="" role="listitem">
|
|
969
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="3" data-item-index="2">
|
|
970
|
+
<span class="selected-option-dropdown-item">Option 3</span>
|
|
971
|
+
<input type="hidden" value="3">
|
|
972
|
+
</a>
|
|
973
|
+
</li>
|
|
974
|
+
<li class="" role="listitem">
|
|
975
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="4" data-item-index="3">
|
|
976
|
+
<span class="selected-option-dropdown-item">Option 4</span>
|
|
977
|
+
<input type="hidden" value="4">
|
|
978
|
+
</a>
|
|
979
|
+
</li>
|
|
980
|
+
<li class="" role="listitem">
|
|
981
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="5" data-item-index="4">
|
|
982
|
+
<span class="selected-option-dropdown-item">Option 5</span>
|
|
983
|
+
<input type="hidden" value="5">
|
|
984
|
+
</a>
|
|
985
|
+
</li>
|
|
986
|
+
<li class="" role="listitem">
|
|
987
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="6" data-item-index="5">
|
|
988
|
+
<span class="selected-option-dropdown-item">Option 6</span>
|
|
989
|
+
<input type="hidden" value="6">
|
|
990
|
+
</a>
|
|
991
|
+
</li>
|
|
992
|
+
<li class="" role="listitem">
|
|
993
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="7" data-item-index="6">
|
|
994
|
+
<span class="selected-option-dropdown-item">Option 7</span>
|
|
995
|
+
<input type="hidden" value="7">
|
|
996
|
+
</a>
|
|
997
|
+
</li>
|
|
998
|
+
<li class="" role="listitem">
|
|
999
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="8" data-item-index="7">
|
|
1000
|
+
<span class="selected-option-dropdown-item">Option 8</span>
|
|
1001
|
+
<input type="hidden" value="8">
|
|
1002
|
+
</a>
|
|
1003
|
+
</li>
|
|
1004
|
+
<li class="" role="listitem">
|
|
1005
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="9" data-item-index="8">
|
|
1006
|
+
<span class="selected-option-dropdown-item">Option 9</span>
|
|
1007
|
+
<input type="hidden" value="9">
|
|
1008
|
+
</a>
|
|
1009
|
+
</li>
|
|
1010
|
+
<li class="" role="listitem">
|
|
1011
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="10" data-item-index="9">
|
|
1012
|
+
<span class="selected-option-dropdown-item">Option 10</span>
|
|
1013
|
+
<input type="hidden" value="10">
|
|
1014
|
+
</a>
|
|
1015
|
+
</li>
|
|
1016
|
+
</ul>
|
|
1017
|
+
</div>
|
|
1018
|
+
</div>
|
|
1019
|
+
</div>
|
|
1020
|
+
<hr>
|
|
1021
|
+
<div class="row">
|
|
1022
|
+
<div class="col-12 col-sm-4 form-group">
|
|
1023
|
+
<label for="10">with truncated label</label>
|
|
1024
|
+
<div class="select dropdown dropup">
|
|
1025
|
+
<button type="button" id="10" class="dropdown-toggle form-control text-left" data-toggle="dropdown" tabindex="0" aria-haspopup="true" aria-expanded="false">
|
|
1026
|
+
<span class="selected-option-text">Select with a very long label to demonstrate truncating inner text with ellipsis</span>
|
|
1027
|
+
<span class="clearButton hide pointer-events-none">
|
|
1028
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
1029
|
+
</span>
|
|
1030
|
+
</span>
|
|
1031
|
+
<span class="caret">
|
|
1032
|
+
</span>
|
|
1033
|
+
</button>
|
|
1034
|
+
<ul class="dropdown-menu" role="menu">
|
|
1035
|
+
<li class="" role="listitem">
|
|
1036
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="1" data-item-index="0">
|
|
1037
|
+
<span class="selected-option-dropdown-item">Select with a very long label to demonstrate truncating inner text with ellipsis</span>
|
|
1038
|
+
<input type="hidden" value="1">
|
|
1039
|
+
</a>
|
|
1040
|
+
</li>
|
|
1041
|
+
<li class="" role="listitem">
|
|
1042
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="2" data-item-index="1">
|
|
1043
|
+
<span class="selected-option-dropdown-item">Label 1</span>
|
|
1044
|
+
<input type="hidden" value="2">
|
|
1045
|
+
</a>
|
|
1046
|
+
</li>
|
|
1047
|
+
<li class="" role="listitem">
|
|
1048
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="3" data-item-index="2">
|
|
1049
|
+
<span class="selected-option-dropdown-item">Label 2</span>
|
|
1050
|
+
<input type="hidden" value="3">
|
|
1051
|
+
</a>
|
|
1052
|
+
</li>
|
|
1053
|
+
</ul>
|
|
1054
|
+
</div>
|
|
1055
|
+
</div>
|
|
1056
|
+
<div class="col-12 col-sm-8 display-flex flex-wrap justify-content-end gap-10">
|
|
1057
|
+
<div>
|
|
1058
|
+
<label for="11">with "pullRight" on small selects</label>
|
|
1059
|
+
<div class="display-flex gap-10 align-items-end">
|
|
1060
|
+
<div class="form-group">
|
|
1061
|
+
<div class="select dropdown">
|
|
1062
|
+
<button type="button" id="11" class="dropdown-toggle form-control text-left" data-toggle="dropdown" tabindex="0" aria-haspopup="true" aria-expanded="false">
|
|
1063
|
+
<span class="selected-option-text">Option 1</span>
|
|
1064
|
+
<span class="clearButton hide pointer-events-none">
|
|
1065
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
1066
|
+
</span>
|
|
1067
|
+
</span>
|
|
1068
|
+
<span class="caret">
|
|
1069
|
+
</span>
|
|
1070
|
+
</button>
|
|
1071
|
+
<ul class="dropdown-menu pull-right" role="menu">
|
|
1072
|
+
<li class="" role="listitem">
|
|
1073
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="1" data-item-index="0">
|
|
1074
|
+
<span class="selected-option-dropdown-item">Option 1</span>
|
|
1075
|
+
<input type="hidden" value="1">
|
|
1076
|
+
</a>
|
|
1077
|
+
</li>
|
|
1078
|
+
<li class="" role="listitem">
|
|
1079
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="2" data-item-index="1">
|
|
1080
|
+
<span class="selected-option-dropdown-item">Option 2</span>
|
|
1081
|
+
<input type="hidden" value="2">
|
|
1082
|
+
</a>
|
|
1083
|
+
</li>
|
|
1084
|
+
<li class="" role="listitem">
|
|
1085
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="3" data-item-index="2">
|
|
1086
|
+
<span class="selected-option-dropdown-item">Option 3 with a very long label for demonstration</span>
|
|
1087
|
+
<input type="hidden" value="3">
|
|
1088
|
+
</a>
|
|
1089
|
+
</li>
|
|
1090
|
+
</ul>
|
|
1091
|
+
</div>
|
|
1092
|
+
</div>
|
|
1093
|
+
<div class="form-group">
|
|
1094
|
+
<div class="select dropdown dropup">
|
|
1095
|
+
<button type="button" id="12" class="dropdown-toggle form-control text-left" data-toggle="dropdown" tabindex="0" aria-haspopup="true" aria-expanded="false">
|
|
1096
|
+
<span class="selected-option-text">Option 1</span>
|
|
1097
|
+
<span class="clearButton hide pointer-events-none">
|
|
1098
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
1099
|
+
</span>
|
|
1100
|
+
</span>
|
|
1101
|
+
<span class="caret">
|
|
1102
|
+
</span>
|
|
1103
|
+
</button>
|
|
1104
|
+
<ul class="dropdown-menu pull-right" role="menu">
|
|
1105
|
+
<li class="" role="listitem">
|
|
1106
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="1" data-item-index="0">
|
|
1107
|
+
<span class="selected-option-dropdown-item">Option 1</span>
|
|
1108
|
+
<input type="hidden" value="1">
|
|
1109
|
+
</a>
|
|
1110
|
+
</li>
|
|
1111
|
+
<li class="" role="listitem">
|
|
1112
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="2" data-item-index="1">
|
|
1113
|
+
<span class="selected-option-dropdown-item">Option 2</span>
|
|
1114
|
+
<input type="hidden" value="2">
|
|
1115
|
+
</a>
|
|
1116
|
+
</li>
|
|
1117
|
+
<li class="" role="listitem">
|
|
1118
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="3" data-item-index="2">
|
|
1119
|
+
<span class="selected-option-dropdown-item">Option 3 with a very long label for demonstration</span>
|
|
1120
|
+
<input type="hidden" value="3">
|
|
1121
|
+
</a>
|
|
1122
|
+
</li>
|
|
1123
|
+
</ul>
|
|
1124
|
+
</div>
|
|
1125
|
+
</div>
|
|
1126
|
+
</div>
|
|
1127
|
+
</div>
|
|
1128
|
+
<div>
|
|
1129
|
+
<label for="13">with "pullRight" and "width-auto"</label>
|
|
1130
|
+
<div class="form-group">
|
|
1131
|
+
<div class="select dropdown">
|
|
1132
|
+
<button type="button" id="13" class="dropdown-toggle form-control text-left" data-toggle="dropdown" tabindex="0" aria-haspopup="true" aria-expanded="false">
|
|
1133
|
+
<span class="selected-option-text">Option 1</span>
|
|
1134
|
+
<span class="clearButton hide pointer-events-none">
|
|
1135
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
1136
|
+
</span>
|
|
1137
|
+
</span>
|
|
1138
|
+
<span class="caret">
|
|
1139
|
+
</span>
|
|
1140
|
+
</button>
|
|
1141
|
+
<ul class="dropdown-menu pull-right width-auto" role="menu">
|
|
1142
|
+
<li class="" role="listitem">
|
|
1143
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="1" data-item-index="0">
|
|
1144
|
+
<span class="selected-option-dropdown-item">Option 1</span>
|
|
1145
|
+
<input type="hidden" value="1">
|
|
1146
|
+
</a>
|
|
1147
|
+
</li>
|
|
1148
|
+
<li class="" role="listitem">
|
|
1149
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="2" data-item-index="1">
|
|
1150
|
+
<span class="selected-option-dropdown-item">Option 2</span>
|
|
1151
|
+
<input type="hidden" value="2">
|
|
1152
|
+
</a>
|
|
1153
|
+
</li>
|
|
1154
|
+
<li class="" role="listitem">
|
|
1155
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="3" data-item-index="2">
|
|
1156
|
+
<span class="selected-option-dropdown-item">Option 3 with a very long label for demonstration</span>
|
|
1157
|
+
<input type="hidden" value="3">
|
|
1158
|
+
</a>
|
|
1159
|
+
</li>
|
|
1160
|
+
</ul>
|
|
1161
|
+
</div>
|
|
1162
|
+
</div>
|
|
1163
|
+
</div>
|
|
1164
|
+
</div>
|
|
1165
|
+
</div>
|
|
1166
|
+
<hr>
|
|
1167
|
+
<div class="form-group">
|
|
1168
|
+
<label for="14">with custom sizes</label>
|
|
1169
|
+
<div class="display-flex gap-10 align-items-end">
|
|
1170
|
+
<div class="form-group">
|
|
1171
|
+
<div class="select dropdown dropup">
|
|
1172
|
+
<button type="button" id="14" class="dropdown-toggle form-control text-left input-lg" data-toggle="dropdown" tabindex="0" aria-haspopup="true" aria-expanded="false">
|
|
1173
|
+
<span class="selected-option-text">
|
|
1174
|
+
<span>
|
|
1175
|
+
<span class="rioglyph rioglyph-status-available text-color-status-available">
|
|
1176
|
+
</span>
|
|
1177
|
+
</span>Option 1</span>
|
|
1178
|
+
<span class="clearButton hide pointer-events-none">
|
|
1179
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
1180
|
+
</span>
|
|
1181
|
+
</span>
|
|
1182
|
+
<span class="caret">
|
|
1183
|
+
</span>
|
|
1184
|
+
</button>
|
|
1185
|
+
<ul class="dropdown-menu" role="menu">
|
|
1186
|
+
<li class="" role="listitem">
|
|
1187
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="1" data-item-index="0">
|
|
1188
|
+
<span class="selected-option-dropdown-item">
|
|
1189
|
+
<span class="rioglyph rioglyph-status-available text-color-status-available">
|
|
1190
|
+
</span>Option 1</span>
|
|
1191
|
+
<input type="hidden" value="1">
|
|
1192
|
+
</a>
|
|
1193
|
+
</li>
|
|
1194
|
+
<li class="" role="listitem">
|
|
1195
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="2" data-item-index="1">
|
|
1196
|
+
<span class="selected-option-dropdown-item">
|
|
1197
|
+
<span class="rioglyph rioglyph-status-driving text-color-status-driving">
|
|
1198
|
+
</span>Option 2</span>
|
|
1199
|
+
<input type="hidden" value="2">
|
|
1200
|
+
</a>
|
|
1201
|
+
</li>
|
|
1202
|
+
<li class="" role="listitem">
|
|
1203
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="3" data-item-index="2">
|
|
1204
|
+
<span class="selected-option-dropdown-item">
|
|
1205
|
+
<span class="rioglyph rioglyph-status-resting text-color-status-resting">
|
|
1206
|
+
</span>Option 3</span>
|
|
1207
|
+
<input type="hidden" value="3">
|
|
1208
|
+
</a>
|
|
1209
|
+
</li>
|
|
1210
|
+
<li class="" role="listitem">
|
|
1211
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="4" data-item-index="3">
|
|
1212
|
+
<span class="selected-option-dropdown-item">
|
|
1213
|
+
<span class="rioglyph rioglyph-status-working text-color-status-working">
|
|
1214
|
+
</span>Option 4</span>
|
|
1215
|
+
<input type="hidden" value="4">
|
|
1216
|
+
</a>
|
|
1217
|
+
</li>
|
|
1218
|
+
</ul>
|
|
1219
|
+
</div>
|
|
1220
|
+
</div>
|
|
1221
|
+
<div class="form-group">
|
|
1222
|
+
<div class="select dropdown dropup">
|
|
1223
|
+
<button type="button" class="dropdown-toggle form-control text-left" data-toggle="dropdown" tabindex="0" aria-haspopup="true" aria-expanded="false">
|
|
1224
|
+
<span class="selected-option-text">
|
|
1225
|
+
<span>
|
|
1226
|
+
<span class="rioglyph rioglyph-status-available text-color-status-available">
|
|
1227
|
+
</span>
|
|
1228
|
+
</span>Option 1</span>
|
|
1229
|
+
<span class="clearButton hide pointer-events-none">
|
|
1230
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
1231
|
+
</span>
|
|
1232
|
+
</span>
|
|
1233
|
+
<span class="caret">
|
|
1234
|
+
</span>
|
|
1235
|
+
</button>
|
|
1236
|
+
<ul class="dropdown-menu" role="menu">
|
|
1237
|
+
<li class="" role="listitem">
|
|
1238
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="1" data-item-index="0">
|
|
1239
|
+
<span class="selected-option-dropdown-item">
|
|
1240
|
+
<span class="rioglyph rioglyph-status-available text-color-status-available">
|
|
1241
|
+
</span>Option 1</span>
|
|
1242
|
+
<input type="hidden" value="1">
|
|
1243
|
+
</a>
|
|
1244
|
+
</li>
|
|
1245
|
+
<li class="" role="listitem">
|
|
1246
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="2" data-item-index="1">
|
|
1247
|
+
<span class="selected-option-dropdown-item">
|
|
1248
|
+
<span class="rioglyph rioglyph-status-driving text-color-status-driving">
|
|
1249
|
+
</span>Option 2</span>
|
|
1250
|
+
<input type="hidden" value="2">
|
|
1251
|
+
</a>
|
|
1252
|
+
</li>
|
|
1253
|
+
<li class="" role="listitem">
|
|
1254
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="3" data-item-index="2">
|
|
1255
|
+
<span class="selected-option-dropdown-item">
|
|
1256
|
+
<span class="rioglyph rioglyph-status-resting text-color-status-resting">
|
|
1257
|
+
</span>Option 3</span>
|
|
1258
|
+
<input type="hidden" value="3">
|
|
1259
|
+
</a>
|
|
1260
|
+
</li>
|
|
1261
|
+
<li class="" role="listitem">
|
|
1262
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="4" data-item-index="3">
|
|
1263
|
+
<span class="selected-option-dropdown-item">
|
|
1264
|
+
<span class="rioglyph rioglyph-status-working text-color-status-working">
|
|
1265
|
+
</span>Option 4</span>
|
|
1266
|
+
<input type="hidden" value="4">
|
|
1267
|
+
</a>
|
|
1268
|
+
</li>
|
|
1269
|
+
</ul>
|
|
1270
|
+
</div>
|
|
1271
|
+
</div>
|
|
1272
|
+
<div class="form-group">
|
|
1273
|
+
<div class="select dropdown dropup">
|
|
1274
|
+
<button type="button" class="dropdown-toggle form-control text-left input-sm" data-toggle="dropdown" tabindex="0" aria-haspopup="true" aria-expanded="false">
|
|
1275
|
+
<span class="selected-option-text">
|
|
1276
|
+
<span>
|
|
1277
|
+
<span class="rioglyph rioglyph-status-available text-color-status-available">
|
|
1278
|
+
</span>
|
|
1279
|
+
</span>Option 1</span>
|
|
1280
|
+
<span class="clearButton hide pointer-events-none">
|
|
1281
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
1282
|
+
</span>
|
|
1283
|
+
</span>
|
|
1284
|
+
<span class="caret">
|
|
1285
|
+
</span>
|
|
1286
|
+
</button>
|
|
1287
|
+
<ul class="dropdown-menu" role="menu">
|
|
1288
|
+
<li class="" role="listitem">
|
|
1289
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="1" data-item-index="0">
|
|
1290
|
+
<span class="selected-option-dropdown-item">
|
|
1291
|
+
<span class="rioglyph rioglyph-status-available text-color-status-available">
|
|
1292
|
+
</span>Option 1</span>
|
|
1293
|
+
<input type="hidden" value="1">
|
|
1294
|
+
</a>
|
|
1295
|
+
</li>
|
|
1296
|
+
<li class="" role="listitem">
|
|
1297
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="2" data-item-index="1">
|
|
1298
|
+
<span class="selected-option-dropdown-item">
|
|
1299
|
+
<span class="rioglyph rioglyph-status-driving text-color-status-driving">
|
|
1300
|
+
</span>Option 2</span>
|
|
1301
|
+
<input type="hidden" value="2">
|
|
1302
|
+
</a>
|
|
1303
|
+
</li>
|
|
1304
|
+
<li class="" role="listitem">
|
|
1305
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="3" data-item-index="2">
|
|
1306
|
+
<span class="selected-option-dropdown-item">
|
|
1307
|
+
<span class="rioglyph rioglyph-status-resting text-color-status-resting">
|
|
1308
|
+
</span>Option 3</span>
|
|
1309
|
+
<input type="hidden" value="3">
|
|
1310
|
+
</a>
|
|
1311
|
+
</li>
|
|
1312
|
+
<li class="" role="listitem">
|
|
1313
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="4" data-item-index="3">
|
|
1314
|
+
<span class="selected-option-dropdown-item">
|
|
1315
|
+
<span class="rioglyph rioglyph-status-working text-color-status-working">
|
|
1316
|
+
</span>Option 4</span>
|
|
1317
|
+
<input type="hidden" value="4">
|
|
1318
|
+
</a>
|
|
1319
|
+
</li>
|
|
1320
|
+
</ul>
|
|
1321
|
+
</div>
|
|
1322
|
+
</div>
|
|
1323
|
+
</div>
|
|
1324
|
+
</div>
|
|
1325
|
+
<hr>
|
|
1326
|
+
<div class="form-group has-error has-feedback max-width-400">
|
|
1327
|
+
<label for="15">with external error feedback</label>
|
|
1328
|
+
<div class="select dropdown has-error dropup">
|
|
1329
|
+
<button type="button" id="15" class="dropdown-toggle form-control text-left" data-toggle="dropdown" tabindex="0" aria-haspopup="true" aria-expanded="false">
|
|
1330
|
+
<span class="selected-option-text">Option 3</span>
|
|
1331
|
+
<span class="clearButton hide pointer-events-none">
|
|
1332
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
1333
|
+
</span>
|
|
1334
|
+
</span>
|
|
1335
|
+
<span class="caret">
|
|
1336
|
+
</span>
|
|
1337
|
+
</button>
|
|
1338
|
+
<ul class="dropdown-menu" role="menu">
|
|
1339
|
+
<li class="" role="listitem">
|
|
1340
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="1" data-item-index="0">
|
|
1341
|
+
<span class="selected-option-dropdown-item">Option 1</span>
|
|
1342
|
+
<input type="hidden" value="1">
|
|
1343
|
+
</a>
|
|
1344
|
+
</li>
|
|
1345
|
+
<li class="" role="listitem">
|
|
1346
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="2" data-item-index="1">
|
|
1347
|
+
<span class="selected-option-dropdown-item">Option 2</span>
|
|
1348
|
+
<input type="hidden" value="2">
|
|
1349
|
+
</a>
|
|
1350
|
+
</li>
|
|
1351
|
+
<li class="" role="listitem">
|
|
1352
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="3" data-item-index="2">
|
|
1353
|
+
<span class="selected-option-dropdown-item">Option 3</span>
|
|
1354
|
+
<input type="hidden" value="3">
|
|
1355
|
+
</a>
|
|
1356
|
+
</li>
|
|
1357
|
+
</ul>
|
|
1358
|
+
</div>
|
|
1359
|
+
<span class="form-control-feedback rioglyph rioglyph-error-sign">
|
|
1360
|
+
</span>
|
|
1361
|
+
<span class="help-block">
|
|
1362
|
+
<span>This is an error message</span>
|
|
1363
|
+
</span>
|
|
1364
|
+
</div>
|
|
1365
|
+
<hr>
|
|
1366
|
+
<div class="max-width-400">
|
|
1367
|
+
<label for="18">with built-in error feedback</label>
|
|
1368
|
+
<div class="select dropdown dropup">
|
|
1369
|
+
<div class="form-group margin-bottom-0 has-feedback has-error">
|
|
1370
|
+
<div class="input-group">
|
|
1371
|
+
<div class="input-group-addon">
|
|
1372
|
+
<span class="rioglyph rioglyph-robot">
|
|
1373
|
+
</span>
|
|
1374
|
+
</div>
|
|
1375
|
+
<div class="form-control-feedback-wrapper">
|
|
1376
|
+
<button type="button" id="18" class="dropdown-toggle form-control text-left" data-toggle="dropdown" tabindex="0" aria-haspopup="true" aria-expanded="false">
|
|
1377
|
+
<span class="selected-option-text">Option 3</span>
|
|
1378
|
+
<span class="clearButton hide pointer-events-none">
|
|
1379
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
1380
|
+
</span>
|
|
1381
|
+
</span>
|
|
1382
|
+
<span class="caret">
|
|
1383
|
+
</span>
|
|
1384
|
+
</button>
|
|
1385
|
+
<span class="form-control-feedback rioglyph rioglyph-error-sign">
|
|
1386
|
+
</span>
|
|
1387
|
+
<span class="help-block white-space-normal">
|
|
1388
|
+
<span>This is an error message</span>
|
|
1389
|
+
</span>
|
|
1390
|
+
</div>
|
|
1391
|
+
</div>
|
|
1392
|
+
</div>
|
|
1393
|
+
<ul class="dropdown-menu" role="menu">
|
|
1394
|
+
<li class="" role="listitem">
|
|
1395
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="1" data-item-index="0">
|
|
1396
|
+
<span class="selected-option-dropdown-item">Option 1</span>
|
|
1397
|
+
<input type="hidden" value="1">
|
|
1398
|
+
</a>
|
|
1399
|
+
</li>
|
|
1400
|
+
<li class="" role="listitem">
|
|
1401
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="2" data-item-index="1">
|
|
1402
|
+
<span class="selected-option-dropdown-item">Option 2</span>
|
|
1403
|
+
<input type="hidden" value="2">
|
|
1404
|
+
</a>
|
|
1405
|
+
</li>
|
|
1406
|
+
<li class="" role="listitem">
|
|
1407
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="3" data-item-index="2">
|
|
1408
|
+
<span class="selected-option-dropdown-item">Option 3</span>
|
|
1409
|
+
<input type="hidden" value="3">
|
|
1410
|
+
</a>
|
|
1411
|
+
</li>
|
|
1412
|
+
</ul>
|
|
1413
|
+
</div>
|
|
1414
|
+
</div>
|
|
1415
|
+
<hr>
|
|
1416
|
+
<div class="form-group">
|
|
1417
|
+
<label for="16">with custom button classes</label>
|
|
1418
|
+
<div class="form-inline">
|
|
1419
|
+
<div class="form-group">
|
|
1420
|
+
<div class="select dropdown shadow-none dropup">
|
|
1421
|
+
<button type="button" id="16" class="dropdown-toggle form-control text-left btn btn-link height-auto padding-0 focus-shadow-none hover-bg-none input-lg" data-toggle="dropdown" tabindex="0" aria-haspopup="true" aria-expanded="false">
|
|
1422
|
+
<span class="selected-option-text">Option 3</span>
|
|
1423
|
+
<span class="clearButton hide pointer-events-none">
|
|
1424
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
1425
|
+
</span>
|
|
1426
|
+
</span>
|
|
1427
|
+
<span class="caret">
|
|
1428
|
+
</span>
|
|
1429
|
+
</button>
|
|
1430
|
+
<ul class="dropdown-menu" role="menu">
|
|
1431
|
+
<li class="" role="listitem">
|
|
1432
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="1" data-item-index="0">
|
|
1433
|
+
<span class="selected-option-dropdown-item">Option 1</span>
|
|
1434
|
+
<input type="hidden" value="1">
|
|
1435
|
+
</a>
|
|
1436
|
+
</li>
|
|
1437
|
+
<li class="" role="listitem">
|
|
1438
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="2" data-item-index="1">
|
|
1439
|
+
<span class="selected-option-dropdown-item">Option 2</span>
|
|
1440
|
+
<input type="hidden" value="2">
|
|
1441
|
+
</a>
|
|
1442
|
+
</li>
|
|
1443
|
+
<li class="" role="listitem">
|
|
1444
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="3" data-item-index="2">
|
|
1445
|
+
<span class="selected-option-dropdown-item">Option 3</span>
|
|
1446
|
+
<input type="hidden" value="3">
|
|
1447
|
+
</a>
|
|
1448
|
+
</li>
|
|
1449
|
+
</ul>
|
|
1450
|
+
</div>
|
|
1451
|
+
</div>
|
|
1452
|
+
<div class="form-group">
|
|
1453
|
+
<div class="select dropdown shadow-none dropup">
|
|
1454
|
+
<button type="button" class="dropdown-toggle form-control text-left btn btn-link height-auto padding-0 focus-shadow-none hover-bg-none" data-toggle="dropdown" tabindex="0" aria-haspopup="true" aria-expanded="false">
|
|
1455
|
+
<span class="selected-option-text">Option 3</span>
|
|
1456
|
+
<span class="clearButton hide pointer-events-none">
|
|
1457
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
1458
|
+
</span>
|
|
1459
|
+
</span>
|
|
1460
|
+
<span class="caret">
|
|
1461
|
+
</span>
|
|
1462
|
+
</button>
|
|
1463
|
+
<ul class="dropdown-menu" role="menu">
|
|
1464
|
+
<li class="" role="listitem">
|
|
1465
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="1" data-item-index="0">
|
|
1466
|
+
<span class="selected-option-dropdown-item">Option 1</span>
|
|
1467
|
+
<input type="hidden" value="1">
|
|
1468
|
+
</a>
|
|
1469
|
+
</li>
|
|
1470
|
+
<li class="" role="listitem">
|
|
1471
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="2" data-item-index="1">
|
|
1472
|
+
<span class="selected-option-dropdown-item">Option 2</span>
|
|
1473
|
+
<input type="hidden" value="2">
|
|
1474
|
+
</a>
|
|
1475
|
+
</li>
|
|
1476
|
+
<li class="" role="listitem">
|
|
1477
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="3" data-item-index="2">
|
|
1478
|
+
<span class="selected-option-dropdown-item">Option 3</span>
|
|
1479
|
+
<input type="hidden" value="3">
|
|
1480
|
+
</a>
|
|
1481
|
+
</li>
|
|
1482
|
+
</ul>
|
|
1483
|
+
</div>
|
|
1484
|
+
</div>
|
|
1485
|
+
<div class="form-group">
|
|
1486
|
+
<div class="select dropdown shadow-none dropup">
|
|
1487
|
+
<button type="button" class="dropdown-toggle form-control text-left btn btn-link height-auto padding-0 focus-shadow-none hover-bg-none input-sm" data-toggle="dropdown" tabindex="0" aria-haspopup="true" aria-expanded="false">
|
|
1488
|
+
<span class="selected-option-text">Option 3</span>
|
|
1489
|
+
<span class="clearButton hide pointer-events-none">
|
|
1490
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
1491
|
+
</span>
|
|
1492
|
+
</span>
|
|
1493
|
+
<span class="caret">
|
|
1494
|
+
</span>
|
|
1495
|
+
</button>
|
|
1496
|
+
<ul class="dropdown-menu" role="menu">
|
|
1497
|
+
<li class="" role="listitem">
|
|
1498
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="1" data-item-index="0">
|
|
1499
|
+
<span class="selected-option-dropdown-item">Option 1</span>
|
|
1500
|
+
<input type="hidden" value="1">
|
|
1501
|
+
</a>
|
|
1502
|
+
</li>
|
|
1503
|
+
<li class="" role="listitem">
|
|
1504
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="2" data-item-index="1">
|
|
1505
|
+
<span class="selected-option-dropdown-item">Option 2</span>
|
|
1506
|
+
<input type="hidden" value="2">
|
|
1507
|
+
</a>
|
|
1508
|
+
</li>
|
|
1509
|
+
<li class="" role="listitem">
|
|
1510
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="3" data-item-index="2">
|
|
1511
|
+
<span class="selected-option-dropdown-item">Option 3</span>
|
|
1512
|
+
<input type="hidden" value="3">
|
|
1513
|
+
</a>
|
|
1514
|
+
</li>
|
|
1515
|
+
</ul>
|
|
1516
|
+
</div>
|
|
1517
|
+
</div>
|
|
1518
|
+
</div>
|
|
1519
|
+
</div>
|
|
1520
|
+
<hr>
|
|
1521
|
+
<div class="form-group">
|
|
1522
|
+
<label for="17">with icons only</label>
|
|
1523
|
+
<div class="form-inline">
|
|
1524
|
+
<div class="form-group">
|
|
1525
|
+
<div class="select dropdown dropup">
|
|
1526
|
+
<button type="button" id="17" class="dropdown-toggle form-control text-left" data-toggle="dropdown" tabindex="0" aria-haspopup="true" aria-expanded="false">
|
|
1527
|
+
<span class="selected-option-text">
|
|
1528
|
+
<span>
|
|
1529
|
+
<span class="rioglyph rioglyph-status-available text-color-status-available">
|
|
1530
|
+
</span>
|
|
1531
|
+
</span>
|
|
1532
|
+
</span>
|
|
1533
|
+
<span class="clearButton hide pointer-events-none">
|
|
1534
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
1535
|
+
</span>
|
|
1536
|
+
</span>
|
|
1537
|
+
<span class="caret">
|
|
1538
|
+
</span>
|
|
1539
|
+
</button>
|
|
1540
|
+
<ul class="dropdown-menu" role="menu">
|
|
1541
|
+
<li class="" role="listitem">
|
|
1542
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="1" data-item-index="0">
|
|
1543
|
+
<span class="selected-option-dropdown-item">
|
|
1544
|
+
<span class="rioglyph rioglyph-status-available text-color-status-available">
|
|
1545
|
+
</span>Option 1</span>
|
|
1546
|
+
<input type="hidden" value="1">
|
|
1547
|
+
</a>
|
|
1548
|
+
</li>
|
|
1549
|
+
<li class="" role="listitem">
|
|
1550
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="2" data-item-index="1">
|
|
1551
|
+
<span class="selected-option-dropdown-item">
|
|
1552
|
+
<span class="rioglyph rioglyph-status-driving text-color-status-driving">
|
|
1553
|
+
</span>Option 2</span>
|
|
1554
|
+
<input type="hidden" value="2">
|
|
1555
|
+
</a>
|
|
1556
|
+
</li>
|
|
1557
|
+
<li class="" role="listitem">
|
|
1558
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="3" data-item-index="2">
|
|
1559
|
+
<span class="selected-option-dropdown-item">
|
|
1560
|
+
<span class="rioglyph rioglyph-status-resting text-color-status-resting">
|
|
1561
|
+
</span>Option 3</span>
|
|
1562
|
+
<input type="hidden" value="3">
|
|
1563
|
+
</a>
|
|
1564
|
+
</li>
|
|
1565
|
+
<li class="" role="listitem">
|
|
1566
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="4" data-item-index="3">
|
|
1567
|
+
<span class="selected-option-dropdown-item">
|
|
1568
|
+
<span class="rioglyph rioglyph-status-working text-color-status-working">
|
|
1569
|
+
</span>Option 4</span>
|
|
1570
|
+
<input type="hidden" value="4">
|
|
1571
|
+
</a>
|
|
1572
|
+
</li>
|
|
1573
|
+
</ul>
|
|
1574
|
+
</div>
|
|
1575
|
+
</div>
|
|
1576
|
+
<div class="form-group">
|
|
1577
|
+
<div class="select dropdown dropup">
|
|
1578
|
+
<button type="button" class="dropdown-toggle form-control text-left" data-toggle="dropdown" tabindex="0" aria-haspopup="true" aria-expanded="false">
|
|
1579
|
+
<span class="selected-option-text">
|
|
1580
|
+
<span class="">
|
|
1581
|
+
<span class="rioglyph rioglyph-status-available text-color-status-available">
|
|
1582
|
+
</span>
|
|
1583
|
+
</span>
|
|
1584
|
+
<span class="inactiveIcon">
|
|
1585
|
+
<span class="rioglyph rioglyph-status-driving text-color-status-driving">
|
|
1586
|
+
</span>
|
|
1587
|
+
</span>
|
|
1588
|
+
<span class="inactiveIcon">
|
|
1589
|
+
<span class="rioglyph rioglyph-status-resting text-color-status-resting">
|
|
1590
|
+
</span>
|
|
1591
|
+
</span>
|
|
1592
|
+
<span class="inactiveIcon">
|
|
1593
|
+
<span class="rioglyph rioglyph-status-working text-color-status-working">
|
|
1594
|
+
</span>
|
|
1595
|
+
</span>
|
|
1596
|
+
</span>
|
|
1597
|
+
<span class="clearButton hide pointer-events-none">
|
|
1598
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
1599
|
+
</span>
|
|
1600
|
+
</span>
|
|
1601
|
+
<span class="caret">
|
|
1602
|
+
</span>
|
|
1603
|
+
</button>
|
|
1604
|
+
<ul class="dropdown-menu" role="menu">
|
|
1605
|
+
<li class="" role="listitem">
|
|
1606
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="1" data-item-index="0">
|
|
1607
|
+
<span class="selected-option-dropdown-item">
|
|
1608
|
+
<span class="rioglyph rioglyph-status-available text-color-status-available">
|
|
1609
|
+
</span>Option 1</span>
|
|
1610
|
+
<input type="hidden" value="1">
|
|
1611
|
+
</a>
|
|
1612
|
+
</li>
|
|
1613
|
+
<li class="" role="listitem">
|
|
1614
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="2" data-item-index="1">
|
|
1615
|
+
<span class="selected-option-dropdown-item">
|
|
1616
|
+
<span class="rioglyph rioglyph-status-driving text-color-status-driving">
|
|
1617
|
+
</span>Option 2</span>
|
|
1618
|
+
<input type="hidden" value="2">
|
|
1619
|
+
</a>
|
|
1620
|
+
</li>
|
|
1621
|
+
<li class="" role="listitem">
|
|
1622
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="3" data-item-index="2">
|
|
1623
|
+
<span class="selected-option-dropdown-item">
|
|
1624
|
+
<span class="rioglyph rioglyph-status-resting text-color-status-resting">
|
|
1625
|
+
</span>Option 3</span>
|
|
1626
|
+
<input type="hidden" value="3">
|
|
1627
|
+
</a>
|
|
1628
|
+
</li>
|
|
1629
|
+
<li class="" role="listitem">
|
|
1630
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="4" data-item-index="3">
|
|
1631
|
+
<span class="selected-option-dropdown-item">
|
|
1632
|
+
<span class="rioglyph rioglyph-status-working text-color-status-working">
|
|
1633
|
+
</span>Option 4</span>
|
|
1634
|
+
<input type="hidden" value="4">
|
|
1635
|
+
</a>
|
|
1636
|
+
</li>
|
|
1637
|
+
</ul>
|
|
1638
|
+
</div>
|
|
1639
|
+
</div>
|
|
1640
|
+
</div>
|
|
1641
|
+
</div>
|
|
1642
|
+
<div class="form-group">
|
|
1643
|
+
<label for="18">with loading spinner</label>
|
|
1644
|
+
<div class="form-inline">
|
|
1645
|
+
<div class="form-group">
|
|
1646
|
+
<div class="select dropdown dropup">
|
|
1647
|
+
<button type="button" id="18" class="dropdown-toggle form-control text-left" data-toggle="dropdown" tabindex="0" aria-haspopup="true" aria-expanded="false">
|
|
1648
|
+
<span class="selected-option-text">
|
|
1649
|
+
<span class="placeholder">Please select</span>
|
|
1650
|
+
</span>
|
|
1651
|
+
<span class="clearButton hide pointer-events-none">
|
|
1652
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
1653
|
+
</span>
|
|
1654
|
+
</span>
|
|
1655
|
+
<span class="caret">
|
|
1656
|
+
</span>
|
|
1657
|
+
</button>
|
|
1658
|
+
<ul class="dropdown-menu" role="menu">
|
|
1659
|
+
<div class="display-flex justify-content-center padding-10">
|
|
1660
|
+
<div class="spinnerInfoBox display-flex justify-content-center align-items-center height-100pct">
|
|
1661
|
+
<div class="spinner">
|
|
1662
|
+
<div>
|
|
1663
|
+
</div>
|
|
1664
|
+
<div>
|
|
1665
|
+
</div>
|
|
1666
|
+
<div>
|
|
1667
|
+
</div>
|
|
1668
|
+
<div>
|
|
1669
|
+
</div>
|
|
1670
|
+
</div>
|
|
1671
|
+
</div>
|
|
1672
|
+
</div>
|
|
1673
|
+
</ul>
|
|
1674
|
+
</div>
|
|
1675
|
+
</div>
|
|
1676
|
+
</div>
|
|
1677
|
+
</div>
|
|
1678
|
+
</div>
|
|
1679
|
+
```
|
|
1680
|
+
|
|
1681
|
+
#### Props
|
|
1682
|
+
|
|
1683
|
+
| Name | Type | Default | Description |
|
|
1684
|
+
| --- | --- | --- | --- |
|
|
1685
|
+
| name | String | — | Passed through as HTML attribute to the toggle button. |
|
|
1686
|
+
| id | String | — | Passed through as HTML attribute to the toggle button. Uses the value given to name if not provided explicitly. |
|
|
1687
|
+
| label | String / Node | — | The label in front of the selected text. |
|
|
1688
|
+
| options | Array of Objects | [] | Items to display in the dropdown menu. |
|
|
1689
|
+
| └id | String | — | Used to identify an option |
|
|
1690
|
+
| └label | String / Node | — | The option item text |
|
|
1691
|
+
| └icon | Node | — | Icon to be displayed in front of the label |
|
|
1692
|
+
| └selected | Boolean | false | Defines whether the menu item is selected. |
|
|
1693
|
+
| └disabled | Boolean | false | Setting "disabled" to true will disable the respective item. |
|
|
1694
|
+
| └header | Boolean | false | Will treat the given value as a menu header. |
|
|
1695
|
+
| value | Array | — | Sets the ids of the selected options when the component is already mounted. |
|
|
1696
|
+
| onChange | Function | () => {} | Callback function triggered when an item is selected. |
|
|
1697
|
+
| placeholder | String / Node | — | Text to display when nothing is selected. |
|
|
1698
|
+
| dropup | Boolean | false | Defines whether the dropdown opens upwards. Set to "true" additionally disables autoDrop feature. |
|
|
1699
|
+
| pullRight | Boolean | false | Defines whether the dropdown opens right aligned to the dropdown toggle. Set to "true" additionally disables autoDrop feature. |
|
|
1700
|
+
| autoDropDirection | Boolean | true | Enables or disables the autoDrop positioning feature. When enabled, the option list opens below or above the input depending on the surrounding space. |
|
|
1701
|
+
| bsSize | String | md | Defines the size of the select to be rendered. Possible values are: 'sm', 'md' and 'lg' |
|
|
1702
|
+
| disabled | Boolean | false | Option to disable the opening of the option list. |
|
|
1703
|
+
| tabIndex | Number | 0 | The tabindex attribute allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the Tab key, hence the name) and determine their relative ordering for sequential focus navigation. See tabIndex |
|
|
1704
|
+
| hasError | Boolean | false | Defines whether the Bootstrap error classes shall be added to the toggle element. |
|
|
1705
|
+
| useFilter | Boolean | false | Defines whether the component should be filterable. |
|
|
1706
|
+
| useClear | Boolean | false | Set to show a clear button |
|
|
1707
|
+
| noItemMessage | String / Node | — | Text that shall be shown when not match was found when filtering. |
|
|
1708
|
+
| selectedOptionText | String / Node | — | Text or node to be rendered on the toggle select instead of the selected item label. |
|
|
1709
|
+
| showSelectedItemIcon | Boolean | false | Set to show only the icon and not the label of selected item. |
|
|
1710
|
+
| showUnselectedItemIcons | Boolean | false | Set to show all item icons within the toggle element. Selected items are highlighted and unselected items are shown as inactive. |
|
|
1711
|
+
| inputAddon | String \| ReactNode | — | Option to add an icon as a leading input addon to the select component. |
|
|
1712
|
+
| errorMessage | String | — | Input error message. |
|
|
1713
|
+
| warningMessage | String | — | Input warning message. |
|
|
1714
|
+
| messageWhiteSpace | 'normal' \| 'prewrap' \| 'nowrap' | 'normal' | Optional warning message white-space setting. |
|
|
1715
|
+
| dropdownClassName | String | — | Additional classes to be set to the dropdown. |
|
|
1716
|
+
| btnClassName | String | — | Additional classes to be set to the select/input. |
|
|
1717
|
+
| className | String | — | Additional classes to be set to the select wrapper. |
|
|
1718
|
+
|
|
1719
|
+
### Example: Example 2
|
|
1720
|
+
|
|
1721
|
+
Select with controlled valuePlease selectOption 1
|
|
1722
|
+
Option 2
|
|
1723
|
+
Option 3
|
|
1724
|
+
|
|
1725
|
+
Select option 3
|
|
1726
|
+
|
|
1727
|
+
#### Summary
|
|
1728
|
+
|
|
1729
|
+
Select with controlled valuePlease selectOption 1
|
|
1730
|
+
Option 2
|
|
1731
|
+
Option 3
|
|
1732
|
+
|
|
1733
|
+
Select option 3
|
|
1734
|
+
|
|
1735
|
+
#### React (tsx)
|
|
1736
|
+
|
|
1737
|
+
```tsx
|
|
1738
|
+
import { useState } from 'react';
|
|
1739
|
+
|
|
1740
|
+
import Select, { type SelectOption } from '@rio-cloud/rio-uikit/Select';
|
|
1741
|
+
import Button from '@rio-cloud/rio-uikit/Button';
|
|
1742
|
+
|
|
1743
|
+
const ControlledSelectExample = () => {
|
|
1744
|
+
const [selectedOptionId, setSelectedOptionId] = useState<string | undefined>();
|
|
1745
|
+
|
|
1746
|
+
const options = [
|
|
1747
|
+
{ id: '1', label: 'Option 1' },
|
|
1748
|
+
{ id: '2', label: 'Option 2' },
|
|
1749
|
+
{ id: '3', label: 'Option 3' },
|
|
1750
|
+
];
|
|
1751
|
+
|
|
1752
|
+
const updateSelectedItem = (item: SelectOption | undefined) => setSelectedOptionId(item?.id);
|
|
1753
|
+
|
|
1754
|
+
return (
|
|
1755
|
+
<div>
|
|
1756
|
+
<label>Select with controlled value</label>
|
|
1757
|
+
<div className='form-inline'>
|
|
1758
|
+
<div className='form-group'>
|
|
1759
|
+
<Select
|
|
1760
|
+
placeholder='Please select'
|
|
1761
|
+
options={options}
|
|
1762
|
+
value={selectedOptionId ? [selectedOptionId] : []}
|
|
1763
|
+
onChange={item => updateSelectedItem(item)}
|
|
1764
|
+
className='min-width-300'
|
|
1765
|
+
useClear
|
|
1766
|
+
/>
|
|
1767
|
+
</div>
|
|
1768
|
+
<div className='form-group'>
|
|
1769
|
+
<Button onClick={() => updateSelectedItem(options[2])}>Select option 3</Button>
|
|
1770
|
+
</div>
|
|
1771
|
+
</div>
|
|
1772
|
+
</div>
|
|
1773
|
+
);
|
|
1774
|
+
};
|
|
1775
|
+
|
|
1776
|
+
export default ControlledSelectExample;
|
|
1777
|
+
```
|
|
1778
|
+
|
|
1779
|
+
#### HTML (html)
|
|
1780
|
+
|
|
1781
|
+
```html
|
|
1782
|
+
<div>
|
|
1783
|
+
<label>Select with controlled value</label>
|
|
1784
|
+
<div class="form-inline">
|
|
1785
|
+
<div class="form-group">
|
|
1786
|
+
<div class="select dropdown min-width-300 dropup">
|
|
1787
|
+
<button type="button" class="dropdown-toggle form-control text-left" data-toggle="dropdown" tabindex="0" aria-haspopup="true" aria-expanded="false">
|
|
1788
|
+
<span class="selected-option-text">
|
|
1789
|
+
<span class="placeholder">Please select</span>
|
|
1790
|
+
</span>
|
|
1791
|
+
<span class="clearButton hide pointer-events-none">
|
|
1792
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
1793
|
+
</span>
|
|
1794
|
+
</span>
|
|
1795
|
+
<span class="caret">
|
|
1796
|
+
</span>
|
|
1797
|
+
</button>
|
|
1798
|
+
<ul class="dropdown-menu" role="menu">
|
|
1799
|
+
<li class="" role="listitem">
|
|
1800
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="1" data-item-index="0">
|
|
1801
|
+
<span class="selected-option-dropdown-item">Option 1</span>
|
|
1802
|
+
<input type="hidden" value="1">
|
|
1803
|
+
</a>
|
|
1804
|
+
</li>
|
|
1805
|
+
<li class="" role="listitem">
|
|
1806
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="2" data-item-index="1">
|
|
1807
|
+
<span class="selected-option-dropdown-item">Option 2</span>
|
|
1808
|
+
<input type="hidden" value="2">
|
|
1809
|
+
</a>
|
|
1810
|
+
</li>
|
|
1811
|
+
<li class="" role="listitem">
|
|
1812
|
+
<a role="menuitem" class="display-flex align-items-center gap-3" data-item-id="3" data-item-index="2">
|
|
1813
|
+
<span class="selected-option-dropdown-item">Option 3</span>
|
|
1814
|
+
<input type="hidden" value="3">
|
|
1815
|
+
</a>
|
|
1816
|
+
</li>
|
|
1817
|
+
</ul>
|
|
1818
|
+
</div>
|
|
1819
|
+
</div>
|
|
1820
|
+
<div class="form-group">
|
|
1821
|
+
<button type="button" class="btn btn-default btn-component" tabindex="0">Select option 3</button>
|
|
1822
|
+
</div>
|
|
1823
|
+
</div>
|
|
1824
|
+
</div>
|
|
1825
|
+
```
|
|
1826
|
+
|
|
1827
|
+
#### Props
|
|
1828
|
+
|
|
1829
|
+
| Name | Type | Default | Description |
|
|
1830
|
+
| --- | --- | --- | --- |
|
|
1831
|
+
| name | String | — | Passed through as HTML attribute to the toggle button. |
|
|
1832
|
+
| id | String | — | Passed through as HTML attribute to the toggle button. Uses the value given to name if not provided explicitly. |
|
|
1833
|
+
| label | String / Node | — | The label in front of the selected text. |
|
|
1834
|
+
| options | Array of Objects | [] | Items to display in the dropdown menu. |
|
|
1835
|
+
| └id | String | — | Used to identify an option |
|
|
1836
|
+
| └label | String / Node | — | The option item text |
|
|
1837
|
+
| └icon | Node | — | Icon to be displayed in front of the label |
|
|
1838
|
+
| └selected | Boolean | false | Defines whether the menu item is selected. |
|
|
1839
|
+
| └disabled | Boolean | false | Setting "disabled" to true will disable the respective item. |
|
|
1840
|
+
| └header | Boolean | false | Will treat the given value as a menu header. |
|
|
1841
|
+
| value | Array | — | Sets the ids of the selected options when the component is already mounted. |
|
|
1842
|
+
| onChange | Function | () => {} | Callback function triggered when an item is selected. |
|
|
1843
|
+
| placeholder | String / Node | — | Text to display when nothing is selected. |
|
|
1844
|
+
| dropup | Boolean | false | Defines whether the dropdown opens upwards. Set to "true" additionally disables autoDrop feature. |
|
|
1845
|
+
| pullRight | Boolean | false | Defines whether the dropdown opens right aligned to the dropdown toggle. Set to "true" additionally disables autoDrop feature. |
|
|
1846
|
+
| autoDropDirection | Boolean | true | Enables or disables the autoDrop positioning feature. When enabled, the option list opens below or above the input depending on the surrounding space. |
|
|
1847
|
+
| bsSize | String | md | Defines the size of the select to be rendered. Possible values are: 'sm', 'md' and 'lg' |
|
|
1848
|
+
| disabled | Boolean | false | Option to disable the opening of the option list. |
|
|
1849
|
+
| tabIndex | Number | 0 | The tabindex attribute allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the Tab key, hence the name) and determine their relative ordering for sequential focus navigation. See tabIndex |
|
|
1850
|
+
| hasError | Boolean | false | Defines whether the Bootstrap error classes shall be added to the toggle element. |
|
|
1851
|
+
| useFilter | Boolean | false | Defines whether the component should be filterable. |
|
|
1852
|
+
| useClear | Boolean | false | Set to show a clear button |
|
|
1853
|
+
| noItemMessage | String / Node | — | Text that shall be shown when not match was found when filtering. |
|
|
1854
|
+
| selectedOptionText | String / Node | — | Text or node to be rendered on the toggle select instead of the selected item label. |
|
|
1855
|
+
| showSelectedItemIcon | Boolean | false | Set to show only the icon and not the label of selected item. |
|
|
1856
|
+
| showUnselectedItemIcons | Boolean | false | Set to show all item icons within the toggle element. Selected items are highlighted and unselected items are shown as inactive. |
|
|
1857
|
+
| inputAddon | String \| ReactNode | — | Option to add an icon as a leading input addon to the select component. |
|
|
1858
|
+
| errorMessage | String | — | Input error message. |
|
|
1859
|
+
| warningMessage | String | — | Input warning message. |
|
|
1860
|
+
| messageWhiteSpace | 'normal' \| 'prewrap' \| 'nowrap' | 'normal' | Optional warning message white-space setting. |
|
|
1861
|
+
| dropdownClassName | String | — | Additional classes to be set to the dropdown. |
|
|
1862
|
+
| btnClassName | String | — | Additional classes to be set to the select/input. |
|
|
1863
|
+
| className | String | — | Additional classes to be set to the select wrapper. |
|
|
1864
|
+
|
|
1865
|
+
### Example: Example 3
|
|
1866
|
+
|
|
1867
|
+
Select with deferred loaded optionsPlease select
|
|
1868
|
+
|
|
1869
|
+
Load options
|
|
1870
|
+
|
|
1871
|
+
#### Summary
|
|
1872
|
+
|
|
1873
|
+
Select with deferred loaded optionsPlease select
|
|
1874
|
+
|
|
1875
|
+
Load options
|
|
1876
|
+
|
|
1877
|
+
#### React (tsx)
|
|
1878
|
+
|
|
1879
|
+
```tsx
|
|
1880
|
+
import { useState } from 'react';
|
|
1881
|
+
|
|
1882
|
+
import Select, { type SelectOption } from '@rio-cloud/rio-uikit/Select';
|
|
1883
|
+
import Button from '@rio-cloud/rio-uikit/Button';
|
|
1884
|
+
|
|
1885
|
+
type CustomSelectOption = SelectOption & {
|
|
1886
|
+
foo: string;
|
|
1887
|
+
};
|
|
1888
|
+
|
|
1889
|
+
const ControlledFilterSelectExample = () => {
|
|
1890
|
+
const [options, setOptions] = useState<CustomSelectOption[] | undefined>(undefined);
|
|
1891
|
+
const [selectedOptionId, setSelectedOptionId] = useState<string | undefined>();
|
|
1892
|
+
|
|
1893
|
+
const updateSelectedItem = (item: CustomSelectOption | undefined) => setSelectedOptionId(item?.id);
|
|
1894
|
+
|
|
1895
|
+
const handleLoadOptions = () =>
|
|
1896
|
+
setOptions([
|
|
1897
|
+
{ id: '1', label: 'Option 1', foo: 'bar' },
|
|
1898
|
+
{ id: '2', label: 'Option 2', foo: 'bar' },
|
|
1899
|
+
{ id: '3', label: 'Option 3', foo: 'bar' },
|
|
1900
|
+
]);
|
|
1901
|
+
|
|
1902
|
+
return (
|
|
1903
|
+
<div>
|
|
1904
|
+
<label htmlFor='selectDeferredOptions'>Select with deferred loaded options</label>
|
|
1905
|
+
<div className='form-inline'>
|
|
1906
|
+
<div className='form-group'>
|
|
1907
|
+
<Select
|
|
1908
|
+
id='selectDeferredOptions'
|
|
1909
|
+
placeholder='Please select'
|
|
1910
|
+
options={options}
|
|
1911
|
+
value={selectedOptionId ? [selectedOptionId] : []}
|
|
1912
|
+
onChange={item => updateSelectedItem(item)}
|
|
1913
|
+
className='min-width-300'
|
|
1914
|
+
useClear
|
|
1915
|
+
useFilter
|
|
1916
|
+
/>
|
|
1917
|
+
</div>
|
|
1918
|
+
<div className='form-group'>
|
|
1919
|
+
<Button onClick={handleLoadOptions}>Load options</Button>
|
|
1920
|
+
</div>
|
|
1921
|
+
</div>
|
|
1922
|
+
</div>
|
|
1923
|
+
);
|
|
1924
|
+
};
|
|
1925
|
+
|
|
1926
|
+
export default ControlledFilterSelectExample;
|
|
1927
|
+
```
|
|
1928
|
+
|
|
1929
|
+
#### HTML (html)
|
|
1930
|
+
|
|
1931
|
+
```html
|
|
1932
|
+
<div>
|
|
1933
|
+
<label for="selectDeferredOptions">Select with deferred loaded options</label>
|
|
1934
|
+
<div class="form-inline">
|
|
1935
|
+
<div class="form-group">
|
|
1936
|
+
<div class="select dropdown min-width-300">
|
|
1937
|
+
<button type="button" id="selectDeferredOptions" class="dropdown-toggle form-control text-left" data-toggle="dropdown" tabindex="0" aria-haspopup="true" aria-expanded="false">
|
|
1938
|
+
<span class="selected-option-text">
|
|
1939
|
+
<span class="placeholder">Please select</span>
|
|
1940
|
+
</span>
|
|
1941
|
+
<span class="clearButton hide pointer-events-none">
|
|
1942
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
1943
|
+
</span>
|
|
1944
|
+
</span>
|
|
1945
|
+
<span class="caret">
|
|
1946
|
+
</span>
|
|
1947
|
+
</button>
|
|
1948
|
+
</div>
|
|
1949
|
+
</div>
|
|
1950
|
+
<div class="form-group">
|
|
1951
|
+
<button type="button" class="btn btn-default btn-component" tabindex="0">Load options</button>
|
|
1952
|
+
</div>
|
|
1953
|
+
</div>
|
|
1954
|
+
</div>
|
|
1955
|
+
```
|
|
1956
|
+
|
|
1957
|
+
#### Props
|
|
1958
|
+
|
|
1959
|
+
| Name | Type | Default | Description |
|
|
1960
|
+
| --- | --- | --- | --- |
|
|
1961
|
+
| name | String | — | Passed through as HTML attribute to the toggle button. |
|
|
1962
|
+
| id | String | — | Passed through as HTML attribute to the toggle button. Uses the value given to name if not provided explicitly. |
|
|
1963
|
+
| label | String / Node | — | The label in front of the selected text. |
|
|
1964
|
+
| options | Array of Objects | [] | Items to display in the dropdown menu. |
|
|
1965
|
+
| └id | String | — | Used to identify an option |
|
|
1966
|
+
| └label | String / Node | — | The option item text |
|
|
1967
|
+
| └icon | Node | — | Icon to be displayed in front of the label |
|
|
1968
|
+
| └selected | Boolean | false | Defines whether the menu item is selected. |
|
|
1969
|
+
| └disabled | Boolean | false | Setting "disabled" to true will disable the respective item. |
|
|
1970
|
+
| └header | Boolean | false | Will treat the given value as a menu header. |
|
|
1971
|
+
| value | Array | — | Sets the ids of the selected options when the component is already mounted. |
|
|
1972
|
+
| onChange | Function | () => {} | Callback function triggered when an item is selected. |
|
|
1973
|
+
| placeholder | String / Node | — | Text to display when nothing is selected. |
|
|
1974
|
+
| dropup | Boolean | false | Defines whether the dropdown opens upwards. Set to "true" additionally disables autoDrop feature. |
|
|
1975
|
+
| pullRight | Boolean | false | Defines whether the dropdown opens right aligned to the dropdown toggle. Set to "true" additionally disables autoDrop feature. |
|
|
1976
|
+
| autoDropDirection | Boolean | true | Enables or disables the autoDrop positioning feature. When enabled, the option list opens below or above the input depending on the surrounding space. |
|
|
1977
|
+
| bsSize | String | md | Defines the size of the select to be rendered. Possible values are: 'sm', 'md' and 'lg' |
|
|
1978
|
+
| disabled | Boolean | false | Option to disable the opening of the option list. |
|
|
1979
|
+
| tabIndex | Number | 0 | The tabindex attribute allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the Tab key, hence the name) and determine their relative ordering for sequential focus navigation. See tabIndex |
|
|
1980
|
+
| hasError | Boolean | false | Defines whether the Bootstrap error classes shall be added to the toggle element. |
|
|
1981
|
+
| useFilter | Boolean | false | Defines whether the component should be filterable. |
|
|
1982
|
+
| useClear | Boolean | false | Set to show a clear button |
|
|
1983
|
+
| noItemMessage | String / Node | — | Text that shall be shown when not match was found when filtering. |
|
|
1984
|
+
| selectedOptionText | String / Node | — | Text or node to be rendered on the toggle select instead of the selected item label. |
|
|
1985
|
+
| showSelectedItemIcon | Boolean | false | Set to show only the icon and not the label of selected item. |
|
|
1986
|
+
| showUnselectedItemIcons | Boolean | false | Set to show all item icons within the toggle element. Selected items are highlighted and unselected items are shown as inactive. |
|
|
1987
|
+
| inputAddon | String \| ReactNode | — | Option to add an icon as a leading input addon to the select component. |
|
|
1988
|
+
| errorMessage | String | — | Input error message. |
|
|
1989
|
+
| warningMessage | String | — | Input warning message. |
|
|
1990
|
+
| messageWhiteSpace | 'normal' \| 'prewrap' \| 'nowrap' | 'normal' | Optional warning message white-space setting. |
|
|
1991
|
+
| dropdownClassName | String | — | Additional classes to be set to the dropdown. |
|
|
1992
|
+
| btnClassName | String | — | Additional classes to be set to the select/input. |
|
|
1993
|
+
| className | String | — | Additional classes to be set to the select wrapper. |
|