HandyOrg / HandyOrg/HandyControl

Combobox AutoComplete Limit SearchFunc

Open
#1,690 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
7.2k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

I settted Combobox's AutoComplete true and IsEditable true, when I input a latter in the textbox, it auto setted the value matched first letters in the
Combobox's ItemSource even though the Combobox's ItemSource has many items matched the textbox's value。I thought mybe I can use the SearchFunc to solve this problem. But I found that when the textbox's matching first letters,It triggered autoComplete effect. Either it trriger the SearchFunc. Why I can not set the AutoComplete false but can use the SearchFunc ? I can't understand.

Steps to reproduce the bug

1.Set the Combobox's AutoComplete false, IsEditable true
2.Set SearchFunc =(param, p2) => {
var source = param.Cast<KeyValuePair<string, string>>();
return source.Where(k => k.Key.Contains(p2.ToString())).Select(k => k.Key).ToList();
};
3.Input some letters in Combobox's textbox, it can't trigger the SearchFunc

Expected behavior

when setting the Combobox's AutoComplete false, IsEditable true, if I set SearchFunc , It can trigger SearchFunc binding function.

Screenshots

Image

Image

Image

NuGet package version

None

IDE

No response

Framework type

No response

Windows version

No response

Additional context

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the WPF ComboBox implementation and the code paths for AutoComplete, IsEditable, and SearchFunc. Reproduce the listed settings with an ItemSource and typing input, then verify whether SearchFunc runs when AutoComplete is false; done means the expected callback behavior is demonstrated and covered against regression.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.