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

th styles not applying to sortable columns in UTable #2089

Closed
CepreR opened this issue Aug 29, 2024 · 2 comments
Closed

th styles not applying to sortable columns in UTable #2089

CepreR opened this issue Aug 29, 2024 · 2 comments
Labels

Comments

@CepreR
Copy link

CepreR commented Aug 29, 2024

Environment

Version

v2.18.4

Reproduction

https://stackblitz.com/edit/nuxt-ui-xz318d?file=app.vue

Description

th styles not applying to sortable columns in UTable

When using the UTable component, custom styles applied to the th element (e.g., color: 'text-pink-400') do not affect columns marked as sortable. This results in inconsistent styling between sortable and non-sortable columns.

Steps to Reproduce:

Define a UTable with custom th styles.
Include both sortable and non-sortable columns.
Observe that the custom styles are not applied to the sortable columns.

Expected Behavior

All column headers should apply the specified th styles, regardless of whether they are sortable.

Additional context

image

Logs

No response

@CepreR CepreR added bug Something isn't working triage labels Aug 29, 2024
@CepreR
Copy link
Author

CepreR commented Aug 29, 2024

Additionally, attempting to modify the default.sortButton configuration (e.g., icon, color, variant) does not have any effect:

    sortButton: {
      color: 'red',
    },

@NasrALdaya
Copy link

It deals with a sortable column th as a custom button with custom styles.

You can customize it however you want and match its style with your own "th".
Here’s how you can give it a pink color: <UTable :columns="columns" :rows="people" :ui="{ th: { color: 'text-pink-500' } }" :sort-button="{ color: 'pink' }"/>

@rdjanuar rdjanuar removed the bug Something isn't working label Nov 8, 2024
@rdjanuar rdjanuar closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants