2

I have admin grid made by using UI component. One of the columns is comments column. Comments can be long and text is spreading horizontally in one line and that breaks grid layout. I want to achieve that text, when it reaches end of cell skips to the next line.

0

You can not do that, but you can resize column width by adding this in your ui_component

<item name="resizeEnabled" xsi:type="boolean">true</item>
<item name="resizeDefaultWidth" xsi:type="string">300</item>

Sample code:

<column name="comment">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="filter" xsi:type="string">text</item>
            <item name="label" xsi:type="string" translate="true">Order Comments</item>
            <item name="sortOrder" xsi:type="number">6</item>
            <item name="resizeDefaultWidth" xsi:type="string">300</item>
        </item>
    </argument>
</column>

Hope you find what you asked :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.