API > @blocksuite/blocks > getBlockElementsExcludeSubtrees
Function: getBlockElementsExcludeSubtrees ​
getBlockElementsExcludeSubtrees(
elements
):Element
[]
Returns block elements excluding their subtrees. Only keep block elements of same level.
Parameters ​
Parameter | Type |
---|---|
elements | BlockComponentElement [] | Element [] |
Returns ​
Element
[]
Defined In ​
packages/blocks/src/_common/utils/query.ts:657