@ballistix.digital/react-components 9.5.1 → 9.5.2

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/dist/index.js CHANGED
@@ -2391,6 +2391,25 @@ const $cb1b9d36d0757897$var$SelectMenu = (props)=>{
2391
2391
  }, [
2392
2392
  error
2393
2393
  ]);
2394
+ const handleFormatOptionLabel = (data)=>{
2395
+ if (searchInputOptionRenderer && data.value.startsWith($cb1b9d36d0757897$var$searchPrefix)) {
2396
+ const tagItem = (0, $iA2ta$reactjsxruntime.jsx)("div", {
2397
+ className: styles.tagItem,
2398
+ children: (0, $iA2ta$reactjsxruntime.jsx)("p", {
2399
+ className: styles.tagItemText,
2400
+ children: data.label
2401
+ })
2402
+ });
2403
+ return (0, $iA2ta$reactjsxruntime.jsx)("div", {
2404
+ className: styles.listItem,
2405
+ children: searchInputOptionRenderer(tagItem)
2406
+ });
2407
+ }
2408
+ return (0, $iA2ta$reactjsxruntime.jsx)("div", {
2409
+ className: styles.listItem,
2410
+ children: data.label
2411
+ });
2412
+ };
2394
2413
  return (0, $iA2ta$reactjsxruntime.jsxs)("div", {
2395
2414
  className: styles.container,
2396
2415
  "data-testid": selectDataTestId,
@@ -2435,28 +2454,7 @@ const $cb1b9d36d0757897$var$SelectMenu = (props)=>{
2435
2454
  onChange: handleChange,
2436
2455
  onSearchInputChange: handleSearchInputChange,
2437
2456
  //
2438
- formatOptionLabel: (data)=>{
2439
- if (searchInputOptionRenderer && data.value.startsWith($cb1b9d36d0757897$var$searchPrefix)) {
2440
- const tagItem = (0, $iA2ta$reactjsxruntime.jsx)("div", {
2441
- className: styles.listItem,
2442
- children: (0, $iA2ta$reactjsxruntime.jsx)("div", {
2443
- className: styles.tagItem,
2444
- children: (0, $iA2ta$reactjsxruntime.jsx)("p", {
2445
- className: styles.tagItemText,
2446
- children: data.label
2447
- })
2448
- })
2449
- });
2450
- return (0, $iA2ta$reactjsxruntime.jsx)("div", {
2451
- className: styles.listItem,
2452
- children: searchInputOptionRenderer(tagItem)
2453
- });
2454
- }
2455
- return (0, $iA2ta$reactjsxruntime.jsx)("div", {
2456
- className: styles.listItem,
2457
- children: data.label
2458
- });
2459
- },
2457
+ formatOptionLabel: searchInputOptionRenderer ? handleFormatOptionLabel : undefined,
2460
2458
  classNames: {
2461
2459
  menuButton: ()=>(0, $622cd2936b18c771$export$4370d69198e9314a)(styles.input, `bx-select-menu-${name}`, state === null && '*:text-gray-300! ', state === null && !isValid && isTouched && '*:text-red-300!'),
2462
2460
  menu: styles.menu,