Skip to content

Commit 09e036a

Browse files
committed
Cannot specify filter for root
1 parent 256bfd2 commit 09e036a

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

projects/natural/src/lib/modules/hierarchic-selector/classes/hierarchic-configuration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export type NodeConfig<T extends UntypedModelService = UntypedModelService> = {
1010
/**
1111
* Whether this node is at the root of the tree (there can be multiple roots in one tree)
1212
*/
13-
root?: true | ExtractVall<T>['filter'];
13+
root?: boolean;
1414

1515
/**
1616
* Additional filters applied in the query sent by getList function

src/app/select-hierarchic/select-hierarchic.component.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,18 @@ export class SelectHierarchicComponent extends AbstractSelect {
5252

5353
public readonly itemForRootNode = nodeConfig({
5454
service: ItemService,
55-
root: {
56-
filter: {
57-
conditions: [
58-
// ...
59-
],
60-
},
61-
},
55+
root: true,
6256
selectableAtKey: 'any',
6357
});
6458

6559
public readonly itemForChildNode = nodeConfig({
6660
service: ItemService,
6761
selectableAtKey: 'any',
62+
filter: {
63+
conditions: [
64+
// ...
65+
],
66+
},
6867
});
6968

7069
public hierarchicConfig2 = hierarchicConfig(

0 commit comments

Comments
 (0)