Skip to content

fix search when passing items #3070

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

Merged
merged 15 commits into from
Oct 14, 2024
Merged

fix search when passing items #3070

merged 15 commits into from
Oct 14, 2024

Conversation

adids1221
Copy link
Contributor

Description

Picker fix search when using items instead of children.
usePickerSearch hook returns filteredItems now.

Changelog

Picker fix search when using items instead of children.

Additional info

MADS-4193

@adids1221 adids1221 requested a review from M-i-k-e-l May 19, 2024 14:08
Copy link
Collaborator

@M-i-k-e-l M-i-k-e-l left a comment

Choose a reason for hiding this comment

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

Another issue: the onSearchChange value we get is correct, but the children`items` is from the previous search (it's one search behind).
It does not look like a regression, but you should definitely fix it or add a ticket to fix it.

@M-i-k-e-l M-i-k-e-l assigned adids1221 and unassigned M-i-k-e-l May 21, 2024
@adids1221 adids1221 requested a review from M-i-k-e-l May 22, 2024 07:56
@adids1221 adids1221 assigned M-i-k-e-l and unassigned adids1221 May 22, 2024
@M-i-k-e-l M-i-k-e-l assigned adids1221 and unassigned M-i-k-e-l May 26, 2024
@adids1221 adids1221 assigned M-i-k-e-l and unassigned adids1221 Jul 8, 2024
@adids1221 adids1221 requested a review from M-i-k-e-l July 8, 2024 07:05
@M-i-k-e-l M-i-k-e-l assigned adids1221 and unassigned M-i-k-e-l Jul 29, 2024
@adids1221 adids1221 mentioned this pull request Aug 15, 2024
2 tasks
@adids1221 adids1221 removed their assignment Sep 23, 2024
@M-i-k-e-l M-i-k-e-l assigned adids1221 and unassigned M-i-k-e-l Sep 25, 2024
@adids1221 adids1221 assigned M-i-k-e-l and unassigned adids1221 Sep 25, 2024
@adids1221 adids1221 requested a review from M-i-k-e-l September 25, 2024 15:08
@M-i-k-e-l M-i-k-e-l assigned adids1221 and unassigned M-i-k-e-l Sep 26, 2024
@adids1221 adids1221 assigned M-i-k-e-l and unassigned adids1221 Oct 13, 2024
const itemLabel = getItemLabelPresenter(label, value, childGetItemLabel || getItemLabel);
return _.filter(items, item => {
const {label, value, getItemLabel: childGetItemLabel} = item.props || item;
const itemLabel = getItemLabelPresenter(label, value, getItemLabel || childGetItemLabel);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
const itemLabel = getItemLabelPresenter(label, value, getItemLabel || childGetItemLabel);
const itemLabel = getItemLabelPresenter(label, value, childGetItemLabel || getItemLabel);

@M-i-k-e-l M-i-k-e-l assigned adids1221 and unassigned M-i-k-e-l Oct 14, 2024
@M-i-k-e-l M-i-k-e-l merged commit 1f99992 into master Oct 14, 2024
1 check passed
@M-i-k-e-l M-i-k-e-l deleted the fix/Picker_search_with_items branch October 14, 2024 06:50
@adids1221 adids1221 linked an issue Oct 14, 2024 that may be closed by this pull request
2 tasks
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.

Picker Search not working
2 participants