react-component / select

React Select
https://select.react-component.now.sh/
MIT License
892 stars 451 forks source link

maxTagPlaceholder renders inside a predefined tag #1043

Open orelHAnyvision opened 1 month ago

orelHAnyvision commented 1 month ago

I would like to use maxTagCount and maxTagPlaceholder props to render selected values and if more then one then render a custom element

<Select
options={[
      { value: 'option1', label: <span>option1</span> },
      { value: 'option2', label: <span>option2</span> },
      { value: 'option3', label: <span>option3</span> },
      { value: 'option4', label: <span>option4</span> }
    ]}
mode='multiple'
maxTagCount={1}
maxTagPlaceholder={() => <div>something</div>}

I would like the <div>something</div> to be rendered without any tag which wrap it, whats happening it that <div>something</div> is rendered inside a tag