model-picker-form

Creates model picker dialogs by subclassing the shared ModelPickerBase class with model and column declarations.

1|Updated Jun 25, 2026
One-click install
npx skills add https://github.com/IgorAIvanov/altera03 --skill model-picker-form-igoraivanov
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: model-picker-form
Source: https://github.com/IgorAIvanov/altera03/tree/main/skills/src/model-picker-form
Command: npx skills add https://github.com/IgorAIvanov/altera03 --skill model-picker-form-igoraivanov

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building a searchable lookup dialog for each model normally means rewriting the search box, table, pagination, and select/cancel logic every time. This Skill shows how to build a picker dialog as a thin subclass of the shared ModelPickerBase, so each model picker is only a model key plus a column list. ## Core Features & Use Cases - Thin picker subclasses: Declare only model and columns (ListColumn with key, title, width, muted, sortable) — search, server-side sort, pagination, and keyboard navigation come from QueryTableBase/ModelPickerBase. - Dialog extensions: Add toolbar buttons via renderToolbarExtra(), filter panels via renderFilters(), custom payloads via extraPayload(), and multiple selection via bus.pickMany(). - Tree pickers: Use ModelTreePickerBase for hierarchical catalogs where parent records are selectable, with expand/collapse and revealNode(id) support. - Use Case: You need a bank-picker dialog for a bank catalog showing name and MFO columns — the Skill produces the entire file as a ~15-line subclass importing BankLookupRow from the model schema. ## Quick Start Create a picker dialog for the bank model showing the name and mfo columns by extending ModelPickerBase.

Frequently Asked Questions about model-picker-form

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

FAQPage Schema
How do I create a model picker dialog with ModelPickerBase?

Create a <Model>Picker.ts file that extends ModelPickerBase<LookupRow> and declares only two members: the model key and a columns array of ListColumn entries. The base class provides search, sort, pagination, keyboard navigation, and select/cancel handling.

What is the difference between ui-picker and a ModelPicker subclass?

ui-picker is the shared inline field component with input, dropdown, and magnifier button. The ModelPicker subclass is the per-model modal dialog that the magnifier opens via bus.pick(), rendered inside the picker-host modal.

How do I add filters or extra buttons to a picker dialog?

Override renderFilters() to show a filter strip above the table and renderToolbarExtra() to add toolbar buttons. Send extra server-side state through extraPayload(), which merges into the lookup payload alongside caller params.

Does ModelPickerBase support selecting multiple rows?

Yes, the caller opens the same dialog with bus.pickMany(), which sets multiple: true. The base then shows checkboxes, a checked counter, and Select (N) in the footer, with checks surviving paging; the subclass needs no changes.

When should I use ModelTreePickerBase instead of ModelPickerBase?

Use ModelTreePickerBase for hierarchical catalogs where parent records are regular selectable records, such as workshops containing sections. The lookup SQL must return parentId, and the dialog loads the whole set with expand/collapse and revealNode support.

Why does my picker lookup return no data or fail?

The lookup SQL function must accept search, page, pageSize, sortBy, and sortDir and return { rows, totals: { count, page, pageSize } }. Rows must include id and the labelField (default name), and the Row type must come from the model's LookupRow schema.