primefaces / primevue

Next Generation Vue UI Component Library
https://primevue.org
MIT License
10.59k stars 1.23k forks source link

DataTable: Icon slot template unable to get a specific style #4062

Closed IanLai0201 closed 1 year ago

IanLai0201 commented 1 year ago

Describe the bug

When I use a slot template to customize the "rowreordericon", I am unable to achieve a specific style for the reorder feature.

image

Reproducer

https://codesandbox.io/s/exciting-turing-myj5cf?file=/src/App.vue

PrimeVue version

3.29.2

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

github-actions[bot] commented 1 year ago

We're unable to replicate your issue, if you are able to create a reproducer or add details please edit this issue. This issue will be closed if no activities in 20 days.

Antal1609 commented 1 year ago

To get row reordering to work you need to add data-pc-section="rowreordericon" like this:

<column :row-reorder="true" :reorderable-column="false">
    <template #rowreordericon>
        <i class="fas fa-bars" data-pc-section="rowreordericon"></i>
    </template>
</column>

Optionally add p-datatable-reorderablerow-handle for the move cursor.