feat: nested selection host support for IR-extension#618
feat: nested selection host support for IR-extension#618
Conversation
fbdd764 to
79fd31a
Compare
79fd31a to
efbf622
Compare
| internal static void SetItemSelection(ItemsRepeater ir, DependencyObject itemRoot, bool value) | ||
| { | ||
| if (x is SelectorItem si) | ||
| var host = GetUseNestedSelectionHost(ir) |
There was a problem hiding this comment.
Could we maybe avoid needing to have both a UseNestedSelectionHost and a IsSelectionHost property? Could we get away with just IsSelectionHost?
Perhaps just search for a selection host if the itemRoot itself is anything other than a SelectorItem or ToggleButton, otherwise assume the root should be the selection host? Or are there common scenarios that this logic wouldn't support?
There was a problem hiding this comment.
If we absolutely need both properties, perhaps we should bubble up some sort of warning/error when one is used without the other?
| } | ||
| private static void ApplyNestedTappedEventBlocker(ItemsRepeater ir, DependencyObject itemRoot) | ||
| { | ||
| Console.WriteLine($"@xy droid:{IsAndroid}, wasm:{IsWasm}"); |
| #endif | ||
|
|
||
| /// <summary> | ||
| /// Update the selection indexes by toggling the provided index, and then coerced according to the selection mode. |
There was a problem hiding this comment.
TIL "indexes" is a thing and you're only supposed to use "indices" in the context of mathematical expressions
| // Unlike for selection behaviors, we don't need to find the "selection host". | ||
| // The selection host is a unrelated concept in the command setup. Additionally, | ||
| // the template root would generally have the same context as the selection host. |
There was a problem hiding this comment.
| // Unlike for selection behaviors, we don't need to find the "selection host". | |
| // The selection host is a unrelated concept in the command setup. Additionally, | |
| // the template root would generally have the same context as the selection host. | |
| // Unlike for selection behaviors, we don't need to find the "selection host". | |
| // The selection host is an unrelated concept in the command setup. Additionally, | |
| // the template root would generally have the same context as the "selection host". |
GitHub Issue (If applicable): closes #611, re: #610
PR Type
What kind of change does this PR introduce?
What is the new behavior?
PR Checklist
Please check if your PR fulfills the following requirements: