Skip to content

Magento 2.4 add column to admin grid

When I add new grid column I got an error says: Something went wrong with processing the default view and we have restored the filter to its original state.

enter image description here

Here is my ui component form code:

<field name="apw_wallet_name" formElement="text" sortOrder="17">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="source" xsi:type="string">apw_wallet_name</item>
                    <item name="label" xsi:type="string" translate="true">Name</item>
                    <item name="formElement" xsi:type="string">input</item>
                </item>
            </argument>
            <settings>
                <dataType>text</dataType>
                <label translate="true">Name</label>
                <dataScope>apw_wallet_name</dataScope>
                <validation>
                    <rule name="required-entry" xsi:type="boolean">true</rule>
                </validation>
            </settings>
        </field>

And the listing form:

<column name="apw_wallet_name">
            <settings>
                <filter>text</filter>
                <label translate="true">Name</label>
                <editor>
                    <editorType>text</editorType>
                    <validation>
                        <rule name="required-entry" xsi:type="boolean">false</rule>
                    </validation>
                </editor>
            </settings>
        </column>