Sometimes you need to select some part of current tree. You need selectors.
Selectors are a way to store a some kind of pointer to a range of links in links.
For example, selectors are used in the system of rules and permissions.
For complete understanding, you need to understand Trees.
Selector
Include
Exclude
SelectorTree
- is link types from preinstalled @deep-foundation/core
deep links package.
A few steps further duplicate the steps from Trees. If you did, you can use the links from there.
<TreesPreparationDuplication>
Let's prepare the types for a reproducible example.
<aside> ‼️ Attention! IDs may not match, as they are taken from different examples. Be careful with mutations.
</aside>
Insert type A
Insert type B=A|=>A
(insert type B where “from” link type could be only A, and “to” link type could be only A)
Insert type C=A|=>A
insert tree by types A
and B
, but not by C
insert links instances of types A
, B
and C
types, recreating scheme represented above
</TreesPreparationDuplication>
Create demo structure of selector.
We need to insert an instance of Selector
, SelectorInclude
and SelectorExclude
. SelectorFilter
will be discussed later (here).