diff --git a/Parts/DropDown.js b/Parts/DropDown.js index 55bc684..4779012 100644 --- a/Parts/DropDown.js +++ b/Parts/DropDown.js @@ -104,13 +104,18 @@ let Dropdown = React.forwardRef(({ children, dropdownCss, onValueChanged, button }); export default Dropdown; -export function DropdownMenu({ children, fallback, notSelectedOne = true, value, onChange, ...props }) { +export function DropdownMenu({ children, fallback, button, notSelectedOne = true, value, onChange, ...props }) { let ref = useRef() let btn = fallback ?? ""; if (children && children.length > 0) btn = children[value > children.length ? 0 : value] + if(button != null) + { + btn = button(btn, value > children.length ? 0 : value); + } + return <> {