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's filterButtonProps prop should accept a partial #7248

Closed
FloEdelmann opened this issue Feb 12, 2025 · 0 comments · Fixed by #7247
Closed

DataTable's filterButtonProps prop should accept a partial #7248

FloEdelmann opened this issue Feb 12, 2025 · 0 comments · Fixed by #7247
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@FloEdelmann
Copy link
Contributor

DataTable's filterButtonProps prop has type DataTableFilterButtonPropsOptions. But in the implementation, it actually deals with partial objects (Partial<DataTableFilterButtonPropsOptions>), to allow users to only overwrite some of the buttons:

headerFilterButtonProps() {
return {
filter: { severity: 'secondary', text: true, rounded: true },
...this.filterButtonProps,
inline: {
clear: { severity: 'secondary', text: true, rounded: true },
...this.filterButtonProps.inline
},
popover: {
addRule: { severity: 'info', text: true, size: 'small' },
removeRule: { severity: 'danger', text: true, size: 'small' },
apply: { size: 'small' },
clear: { outlined: true, size: 'small' },
...this.filterButtonProps.popover
}
};

The prop type should reflect that, see PR #7247.

@tugcekucukoglu tugcekucukoglu added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Feb 19, 2025
@tugcekucukoglu tugcekucukoglu added this to the 4.3.0 milestone Feb 19, 2025
@github-project-automation github-project-automation bot moved this to Review in PrimeVue Feb 19, 2025
@github-project-automation github-project-automation bot moved this from Review to Done in PrimeVue Feb 19, 2025
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
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants