简体   繁体   中英

Make each value of MUI autocomplete sit on a new line

I have a multi-select MUI Autocomplete component, and would like the selected options to sit on its own individual line to improve readability, but not sure how to go about it. It currently looks like this:

在此处输入图像描述

So for greater clarity, I would like the first value to display like "South Africa" and then the next value would be on the next line like "Portugal"

You can use the renderTags prop to completely control how the tags that are rendered.

Rudimentary CodeSandbox Link

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