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

fix: Use picker for iris grid partition selector #2012

Merged
merged 4 commits into from
May 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/iris-grid/src/IrisGridPartitionSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -303,15 +303,16 @@ class IrisGridPartitionSelector extends Component<
}
const partitionSelectors = model.partitionColumns.map((column, index) => (
<div key={`selector-${column.name}`} className="column-selector">
<div className="column-name">{column.name}</div>
{partitionTables?.[index] && (
<Picker
label={column.name}
table={partitionTables[index]}
direction="bottom"
shouldFlip={false}
keyColumn={partitionTables[index].columns[index].name}
placeholder={'Loading...' as string}
labelColumn={partitionTables[index].columns[index].name}
labelPosition="side"
Copy link
Member

Choose a reason for hiding this comment

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

I would've probably grouped the label and labelPosition props together (since they're both labelling the component), but 🤷

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My bad, I thought I should have labelColumn and labelPosition together, but what you have mentioned makes sense, since the labelColumn is referring to something else. Should be good now

onChange={this.getCachedChangeCallback(index)}
defaultSelectedKey={partitions[index] as ItemKey}
isDisabled={
Expand Down
Loading