简体   繁体   中英

React MUI multiple select render selected value as Chip

I'm trying to figure how can I render Chip on MUI multiple select components that will act like the checkmarks from the docs.

The component from the docs

I mean that I want to render multiple Chip separate by "," and not expand the select input, is it possible?

If you want to stop the input from growing when you select more options you can use the Autocomplete component that has a limitTags prop where you define how many chips should be displayed when the input is out of focus .

limitTags prop being used to limit the number of chips displayed

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM