From 9efe801919be5d5cd62e0043a30f9fc19888cda3 Mon Sep 17 00:00:00 2001 From: Mohammer5 Date: Wed, 24 Jul 2024 12:37:00 +0200 Subject: [PATCH] feat(transfer): use native single-/multi selects --- components/transfer/src/options-container.js | 46 +++++++++++------ components/transfer/src/transfer-option.js | 53 ++++++-------------- components/transfer/src/transfer.js | 4 ++ 3 files changed, 52 insertions(+), 51 deletions(-) diff --git a/components/transfer/src/options-container.js b/components/transfer/src/options-container.js index ce3c60a55e..ba050ee5b2 100644 --- a/components/transfer/src/options-container.js +++ b/components/transfer/src/options-container.js @@ -12,10 +12,12 @@ export const OptionsContainer = ({ getOptionClickHandlers, highlightedOptions, loading, + maxSelections, renderOption, options, selected, selectionHandler, + setHighlightedOptions, toggleHighlightedOption, }) => { const optionsRef = useRef(null) @@ -31,9 +33,28 @@ export const OptionsContainer = ({ )}
-
+
-
+ ) } @@ -81,7 +61,6 @@ TransferOption.propTypes = { className: PropTypes.string, dataTest: PropTypes.string, disabled: PropTypes.bool, - highlighted: PropTypes.bool, onClick: PropTypes.func, onDoubleClick: PropTypes.func, } diff --git a/components/transfer/src/transfer.js b/components/transfer/src/transfer.js index deca9a9f9f..1df39c9765 100644 --- a/components/transfer/src/transfer.js +++ b/components/transfer/src/transfer.js @@ -217,6 +217,8 @@ export const Transfer = ({ )}