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

[Feature Request] HOW TO: Use renderHeaderCell and keep standard sorting features #633

Open
chris-copleston opened this issue Sep 11, 2024 · 0 comments

Comments

@chris-copleston
Copy link

I am opening an issue for

vue-easytable

Issue Type

Feature

Issue Title

HOW TO: Use renderHeaderCell and keep standard sorting features

What problem does this feature solve?

This tip explains how to keep the standard sorting features when using renderHeaderCell

What does the proposed API look like?

Note

This is a tip and needs no action.

By default, if you use renderHeaderCell on a column, you can no longer click the rendered header to perform a sort, you have to click the up/down indicators which is fiddly.

A simple solution is to add the css style: pointer-events: none; to you rendered header element(s).

Example

          renderHeaderCell: ({ column }, h) => {
            return (
              <i
                class="fal fa-fw fa-file-signature"
                style="pointer-events: none;"
              />
            )
          },

I hope it helps someone.

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

1 participant