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(dnd&column): make to fix the blank state issue when only one column select #19651

Merged
merged 1 commit into from
Apr 15, 2022
Merged
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,7 @@ export function DndColumnSelect(props: DndColumnSelectProps) {
);

const popoverOptions = useMemo(
() =>
Object.values(options).filter(
col =>
!optionSelector.values
.filter(isColumnMeta)
.map((val: ColumnMeta) => val.column_name)
.includes(col.column_name),
Comment on lines -132 to -136
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you confirm that we don't have other side effects by removing this filter?

If we really don't need this filter, can you add the reason into PR description so others can get an idea?

Copy link
Member

Choose a reason for hiding this comment

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

It was supposed to filter out the current value from options when editing metric/column/filter. I suppose we don't really need it so lgtm 👍

),
() => Object.values(options),
[optionSelector.values, options],
Comment on lines +130 to 131
Copy link
Member

Choose a reason for hiding this comment

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

Isn't optionSelector redundant in the dependency array after this?

);

Expand Down