-
Notifications
You must be signed in to change notification settings - Fork 25
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(data table manager): add property to disable dropdown options in… #2953
Conversation
… data table settings
🦋 Changeset detectedLatest commit: 2923046 The changes in this PR will be included in the next version bump. This PR includes changesets to release 98 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -34,6 +34,7 @@ type MappedColumns = Record<string, TColumnData>; | |||
export type TDropdownOption = { | |||
value: string; | |||
label: string; | |||
isDisabled?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this shows up in the README.md, but maybe just run yarn generate-readmes
to figure out if something changed and commit if necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
: [ | ||
{ | ||
value: DISPLAY_SETTINGS, | ||
isDisabled: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the value of this will come from customSettings and not a hard coded true. or am I missing it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. In a sense, we are not hard coding it. When you look at the logic that leads to it, we already did a check in a function where the disabled property is passed from the customSettings and then further used to check if we should disable or not
const areCustomColumnSettingsEnabled = Boolean(
props.customColumnManager &&
!props.customColumnManager?.disableCustomColumnManager
);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ddouglasz Okay I understand now. So we will now have to make use of the areCustomColumnSettingsEnables
prop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will pass the disableCustomColumnManager
through the customColumnManager
object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
…wn should not display
Description
During the migration to the dropdown options for the data table manager, we missed the proper behaviuor of the data table when disabled
This pull request properly introduces the expected feature to the data table manager component, allowing dropdown options to be disabled. .