Skip to content

How to customize grid UI ? #1237

Answered by suraj-webkul
wynn8488 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @wynn8488,

You can customize the DataGrid UI using slots, and also listen to Vue slot events for further customization. Here’s how to set up the slot structure:

<x-slot:toolbar-left-before>
</x-slot>

<x-slot:toolbar-left-after>
</x-slot>

<x-slot:toolbar-right-before>
</x-slot>

<x-slot:toolbar-right-after>
</x-slot>

To integrate this with your DataGrid component:

<x-admin::datagrid
    src="{{ route('admin.contacts.persons.index') }}"
    :isMultiRow="true"
    ref="datagrid"
>
    <template #header="{
        isLoading,
        available,
        applied,
        selectAll,
        sort,
        performAction
    }">
        <!-- Header content goes here -->
    </template>

    <t…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by suraj-webkul
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants