Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entities Selector question #5

Open
UpSage opened this issue Dec 22, 2023 · 4 comments
Open

Entities Selector question #5

UpSage opened this issue Dec 22, 2023 · 4 comments

Comments

@UpSage
Copy link

UpSage commented Dec 22, 2023

Hi May I ask if your Entity Selector also works on a custom entities? So basically , we created a "Downloads" entity from the admin but we also want this to show from the widget and select it.

Please let me know if it is possible.

Thank you

@graschik
Copy link
Owner

Hello UpSage
You need to create a listing component for your "Downloads". Something like this vendor/magento/module-cms/view/adminhtml/ui_component/cms_page_listing.xml.
And then use it here

<component name="cms_pages" class="Grasch\AdminUi\Component\EntitiesSelector" component="Grasch_AdminUi/js/view/components/entities-selector">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="label" xsi:type="string">Downloads</item>
                <item name="namespace" xsi:type="string">downloads_listing</item>
                <item name="columnsName" xsi:type="string">downloads_columns</item>
                <item name="selectionsColumnName" xsi:type="string">ids</item>
                <item name="grid" xsi:type="array">
                    <item name="columns" xsi:type="array">
                        <item name="id" xsi:type="array">
                            <item name="original_name" xsi:type="string">download_id</item>
                            <item name="type" xsi:type="string">text</item>
                            <item name="label" xsi:type="string">ID</item>
                            <item name="sortOrder" xsi:type="number">10</item>
                            <item name="fit" xsi:type="boolean">false</item>
                        </item>
                    </item>
                </item>
            </item>
        </argument>
</component>

@UpSage
Copy link
Author

UpSage commented Jan 4, 2024

Thank you @graschik , I will look into it.

@UpSage
Copy link
Author

UpSage commented Jul 23, 2024

Hi @graschik . it works but the “remove” button/link won’t work. It’s just spins

@UpSage
Copy link
Author

UpSage commented Jul 24, 2024

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants