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

feat(Table): add checkbox ui config #1409

Merged
merged 5 commits into from
Apr 10, 2024
Merged

feat(Table): add checkbox ui config #1409

merged 5 commits into from
Apr 10, 2024

Conversation

zoobzio
Copy link
Contributor

@zoobzio zoobzio commented Feb 23, 2024

πŸ”— Linked issue

Resolves #1344

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Add a checkbox section to the table config to allow the user to define the color used on the checkbox component used internally by the table component for row selections.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

shinGangan and others added 2 commits February 23, 2024 17:40
…77f1 (#1405)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@@ -4,7 +4,7 @@
<thead :class="ui.thead">
<tr :class="ui.tr.base">
<th v-if="modelValue" scope="col" :class="ui.checkbox.padding">
<UCheckbox :model-value="indeterminate || selected.length === rows.length" :indeterminate="indeterminate" aria-label="Select all" @change="onChange" />
<UCheckbox :model-value="indeterminate || selected.length === rows.length" :indeterminate="indeterminate" :color="ui.default.checkbox.color" aria-label="Select all" @change="onChange" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it could be nice to v-bind="ui.default.checkbox" here so we can change other props than color.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reminds me of this PR: #1269

@zguig52
Copy link

zguig52 commented Mar 7, 2024

Hi guys, don't know if it is the right place to talk about this sorry if not. Wouldn't it be more flexible to allow selected row slot customization directly?
I have a use case where I some items can be selected but other not (based on 1 property of the table). I was searching how to disable for these rows the select field. Any idea?

@benjamincanac benjamincanac merged commit 8b54660 into nuxt:dev Apr 10, 2024
1 check passed
@benjamincanac
Copy link
Member

Thanks @zoobzio and sorry for the delay πŸ˜…

@benjamincanac
Copy link
Member

@zguig52 Would you mind opening a new issue for this? An issue might already exists about this topic.

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

Successfully merging this pull request may close these issues.

Change <UTable> checkbox color
4 participants