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

Elijbet/4348 fix combobox input value filtering #4404

Closed
wants to merge 33 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
b3cc585
fix(combobox): listbox item focused with home or end now scrolls into…
Elijbet Mar 24, 2022
d211c8e
Arrow key interaction adjustements
Elijbet Mar 30, 2022
89c6047
Merge branch 'master' into elijbet/4265-fix-combobox-home/end-bring-f…
Elijbet Mar 30, 2022
b2ce2dd
a small change to fix failing related tests
Elijbet Mar 30, 2022
f0fb6c1
scrolling home test added
Elijbet Mar 31, 2022
a793064
WIP: when the combobox is focused & closed, Home scrolls the entire p…
Elijbet Apr 4, 2022
87771c2
WIP: working Page Up/Down test
Elijbet Apr 5, 2022
d611384
Merge branch 'master' into elijbet/4265-fix-combobox-home/end-bring-f…
Elijbet Apr 5, 2022
09095b2
WIP: move scrollTo function to utils
Elijbet Apr 5, 2022
0cf8dcd
fix related Failing Tests: ArrowDown and Space no longer open the lis…
Elijbet Apr 6, 2022
38d01af
Merge branch 'master' into elijbet/4265-fix-combobox-home/end-bring-f…
Elijbet Apr 6, 2022
3b768fa
pick up comments
Elijbet Apr 6, 2022
20b3673
Merge branch 'master' into elijbet/4265-fix-combobox-home/end-bring-f…
Elijbet Apr 6, 2022
9af2676
WIP: rework bringing combobox in focus
Elijbet Apr 7, 2022
3d5e20a
WIP: screener test ScrollHomeEnd
Elijbet Apr 7, 2022
dfafa2e
Merge branch 'master' into elijbet/4265-fix-combobox-home/end-bring-f…
Elijbet Apr 7, 2022
f89029b
WIP: comboboxOverflow story and fix to the steps
Elijbet Apr 7, 2022
d7b0a75
Merge branch 'master' into elijbet/4265-fix-combobox-home/end-bring-f…
Elijbet Apr 7, 2022
47b7fb3
rename inViewport method to comboboxInViewport to make it more descri…
Elijbet Apr 8, 2022
b6b05cf
refactor per comments
Elijbet Apr 8, 2022
3fb7b66
some more refactoring based on comments
Elijbet Apr 8, 2022
4410d33
refactor to reuse scroll position
Elijbet Apr 8, 2022
b373923
remove screener tests to open a new issue on these
Elijbet Apr 8, 2022
f5df3a6
Merge branch 'master' into elijbet/4265-fix-combobox-home/end-bring-f…
Elijbet Apr 8, 2022
18b9068
ensure tests pass
Elijbet Apr 9, 2022
57edd07
remove unused import
Elijbet Apr 9, 2022
7a63594
cleanup
Elijbet Apr 11, 2022
01cb626
Merge branch 'master' into elijbet/4265-fix-combobox-home/end-bring-f…
Elijbet Apr 11, 2022
934f443
pageUp/Down fail if not waited for: try await page.waitForChanges()
Elijbet Apr 11, 2022
b7223bc
pageUp/Down fail if not waited for: try await page.waitForTimeout(500)
Elijbet Apr 11, 2022
795cf6a
extract the variable and explain the use
Elijbet Apr 11, 2022
c250daf
fix(combobox): input value will now filter correctly as typed in
Elijbet Apr 13, 2022
d019191
Merge branch 'master' into elijbet/4348-fix-combobox-input-value-filt…
Elijbet Apr 13, 2022
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
2 changes: 1 addition & 1 deletion src/components/combobox/combobox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ export class Combobox implements LabelableComponent, FormComponent, InteractiveC
item &&
filteredData.some(({ label, value }) => {
if (isGroup(item)) {
return value === item.label || value === item.label;
return value === item.label;
}

return (
Expand Down
4 changes: 3 additions & 1 deletion src/utils/filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ export const filter = (data: Array<object>, value: string): Array<any> => {
return true;
}
let found = false;
forIn(input, (val) => {
const inputSubset = (({ label, value }) => ({ label, value }))(input as any);

forIn(inputSubset, (val) => {
if (typeof val === "function") {
return;
}
Expand Down