mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-09-14 22:05:22 +03:00
docs(web-test): fix hierarchical list — switch to flat mode before filter
The Alt+F (Найти) in 1C navigates the tree instead of filtering. Correct approach: Ещё → Режим просмотра → Список, then filterList. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
d28bea8f0a
commit
c6eae770f5
@@ -166,16 +166,32 @@ Single `clickElement(text)` only selects the row. To open — always use `{dblcl
|
|||||||
|
|
||||||
### Hierarchical lists (catalogs)
|
### Hierarchical lists (catalogs)
|
||||||
|
|
||||||
Simple search (`filterList('text')`) does NOT work for hierarchical catalogs — it shows
|
Simple search and `filterList(text, {field})` do NOT work on hierarchical catalogs —
|
||||||
groups instead of filtering elements. For Контрагенты, Номенклатура, Сотрудники, etc.
|
they navigate the tree instead of filtering. For Контрагенты, Номенклатура, Сотрудники, etc.
|
||||||
always use advanced search with a specific field:
|
switch to flat list mode first:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
await filterList('Конфетпром', { field: 'Наименование' }); // correct
|
// 1. Detect: readTable returns `hierarchical: true` when rows have groups
|
||||||
// NOT: await filterList('Конфетпром') -- shows groups, not flat results
|
const table = await readTable({ maxRows: 5 });
|
||||||
|
if (table.hierarchical) {
|
||||||
|
// 2. Switch to flat mode via "Ещё" → "Режим просмотра" → "Список"
|
||||||
|
await clickElement('Еще');
|
||||||
|
await clickElement('Режим просмотра');
|
||||||
|
await clickElement('Список');
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. Now filterList works normally
|
||||||
|
await filterList('Конфетпром', { field: 'Наименование в программе' });
|
||||||
|
// ...work with results...
|
||||||
|
|
||||||
|
// 4. Clean up: switch back to hierarchical mode
|
||||||
|
await unfilterList();
|
||||||
|
await clickElement('Еще');
|
||||||
|
await clickElement('Режим просмотра');
|
||||||
|
await clickElement('Иерархический список');
|
||||||
```
|
```
|
||||||
|
|
||||||
Hint: if `readTable()` returns rows with `_kind: 'group'`, the list is hierarchical.
|
Hint: if `readTable()` returns `hierarchical: true`, always switch to flat mode before filtering.
|
||||||
|
|
||||||
### Closing forms
|
### Closing forms
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user