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

[DataTable] Reorder feature and rowreordericon slot problem. #4459

Closed
atakantepe opened this issue Sep 17, 2023 · 1 comment
Closed

[DataTable] Reorder feature and rowreordericon slot problem. #4459

atakantepe opened this issue Sep 17, 2023 · 1 comment
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@atakantepe
Copy link
Member

Discussed in https://github.com/orgs/primefaces/discussions/42

Originally posted by tuffkidd September 14, 2023
The Reorder feature of DataTable sometimes doesn't work correctly.

  1. When I click the reorder icon, the draggable attribute of the corresponding changes from false to true.
  2. However, after moving it, occasionally the false does not change back to true, making it impossible to reorder.
  3. After randomly clicking other areas and then clicking it again, it changes to true.

PrimeVue-DataTable-Reorder

And when using the rowreordericon slot, the icon appears but it doesn't work. See the code below.

<Column :row-reorder="true" header-style="width: 3em">
  <template #rowreordericon>
    <i :class="['p-datatable-reorderablerow-handle', 'ICONCLASS']" style="font-size: 1.25rem"></i>
  </template>
</Column>
@atakantepe atakantepe added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Sep 17, 2023
@tugcekucukoglu tugcekucukoglu added this to the 3.34.2 milestone Sep 19, 2023
@tugcekucukoglu tugcekucukoglu self-assigned this Sep 19, 2023
@Antal1609
Copy link

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.

Originally answered in #4062

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

3 participants