Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const groupChildren = []
// add a separator above
if (!isFirstChild && !afterGroup) {
groupChildren.push()
}
// create a sublist as a group
// a wrapping listitem will be created by Options
groupChildren.push(
{Children.map(children, (child) => {
return this.renderOption(child, {
getOptionProps,
getDisabledOptionProps
})
})}
)
// add a separator below
if (!isLastChild) {
groupChildren.push()
}