# Auto-Resizing KendoReact DropdownList to Fit Longest List Item

## Environment

<table>
    <tbody>
	    <tr>
	    	<td>Product Version</td>
	    	<td>11.3.1</td>
	    </tr>
	    <tr>
	    	<td>Product</td>
	    	<td>Progress® KendoReact DropDownList</td>
	    </tr>
    </tbody>
</table>

## Description

When using the [KendoReact DropDownList](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist), the width does not automatically adjust to fit the longest item in the list unless explicitly set. By default, the component renders with a fixed width based on its container or the initially selected value. This can result in long items being cut off before any selection is made.

This knowledge base article also answers the following questions:

* How can I make KendoReact DropDownList auto-resize to fit the longest item?
* What is the workaround for clipping long items in KendoReact DropDownList?
* How to programmatically set the width of KendoReact DropDownList?

## Solution

To ensure the KendoReact DropDownList adjusts its width to fit the longest item from the start, calculate the width of the longest item in the list programmatically and set the `style.width` property of the component.

[Demo Source](https://demos.telerik.com/kendo-react-ui/knowledge-base/dropdownlist/auto-resize-width-longest-item/source.txt)

## See Also

* [KendoReact DropDownList Documentation](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist)
* [KendoReact Dropdowns Overview](https://www.telerik.com/kendo-react-ui/components/dropdowns)
