Skip to content

Commit 1f174a9

Browse files
committed
Helper functions for filtering out nodes that are not loaded
1 parent d821409 commit 1f174a9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

light-model-client/src/commonMain/kotlin/org/modelix/client/light/LightModelClient.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,3 +773,7 @@ fun NodeData.asUpdateData(): NodeUpdateData {
773773
children = children
774774
)
775775
}
776+
777+
fun INode.isLoaded() = isValid
778+
fun Iterable<INode>.filterLoaded() = filter { it.isLoaded() }
779+
fun Sequence<INode>.filterLoaded() = filter { it.isLoaded() }

0 commit comments

Comments
 (0)