uno-mvux-selection

Implement MVUX list item selection in Uno Platform ListView and GridView.

9|1|Updated Dec 10, 2024
One-click install
npx skills add https://github.com/unoplatform/studio --skill uno-mvux-selection
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: uno-mvux-selection
Source: https://github.com/unoplatform/studio/tree/main/plugins/uno-platform-studio/skills/uno-mvux-selection
Command: npx skills add https://github.com/unoplatform/studio --skill uno-mvux-selection

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

MVUX list controls require precise synchronization between the UI state and the underlying data model to support both single and multi-item selection scenarios, including proper handling of selection changes and commands that depend on the current selection.

Core Features & Use Cases

  • Selection binding: apply the MVUX Selection operator to ListView/GridView backed state to track the current selection.
  • State patterns: supports IState<T> for single selection and IState<IImmutableList<T>> for multi-selection, with automatic UI synchronization.
  • Practical use: enables actions like edit or delete on selected items in MVUX-driven UIs.

Quick Start

Define the desired selection mode and apply the MVUX Selection pattern to your ListView-backed state.

Frequently Asked Questions about uno-mvux-selection

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement list selection in MVUX ListView and GridView controls?

To implement MVUX list selection, apply the Selection operator to your ListView or GridView backed state. This pattern automatically synchronizes the UI selection with your underlying data model across both single and multi-selection scenarios.

What state types do I use for single and multi-selection in Uno Platform MVUX?

For single item selection in Uno Platform MVUX, use IState&lt;T&gt;. For handling multiple selected items, use IState&lt;IImmutableList&lt;T&gt;&gt; to ensure robust state management and automatic UI synchronization.

How does MVUX selection synchronization work between the UI and the data model?

MVUX selection synchronization works by binding the Selection operator to state objects, ensuring that any selection change in the UI automatically updates the underlying IState or IImmutableList, keeping commands and the data model consistent.

Can I use MVUX selection patterns to enable edit or delete commands on selected list items?

Yes, you can enable edit or delete commands on selected list items using MVUX selection patterns. By binding selection to IState&lt;T&gt; or IState&lt;IImmutableList&lt;T&gt;&gt;, your commands can reliably access and act on the currently selected items.

Why does my MVUX ListView selection fail to trigger downstream commands?

MVUX ListView selection commands fail when the state is not properly bound using the Selection operator or the incorrect IState type is applied. Ensuring IState&lt;T&gt; for single and IState&lt;IImmutableList&lt;T&gt;&gt; for multi-selection resolves command execution issues.