I need to create new option with label "Ostatni" if there are no options left. I tried to do it by customising MenuList and NoOptionsMessage, but nothing works. Is there any way?
I tried it this way
NoOptionsMessage = props => (
<components.NoOptionsMessage
{...props}
children={<components.Option {...components.Option.defaultProps} data={{ value: 37, label: 'Ostatni' }} />}
/>
)
Jan Sedloň
Student
Sebastian
I try to accomplish the same but wasn't successful either. The docs are sadly not very helpful. The source of react-select does it like this:
NoOptionsMessage = () => "no items available";
May this is the way to go I hadn't had a chance to try this out yet due my strong time schedule this month 🙄