This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.
Releases
@itwin/presentation-hierarchies-react@0.3.0
Minor Changes
#605: Added onHierarchyLimitExceeded callback to useTree and useUnifiedSelectionTree for tracking when hierarchy level exceeds the limit.
import { TreeRenderer, useTree } from "@itwin/presentation-hierarchies-react";
function MyTree(props: MyTreeProps) {
const state = useTree({
...props,
onHierarchyLimitExceeded: ({ nodeId, filter, limit }) => {
console.log(`Hierarchy limit of ${limit} exceeded for node ${nodeId}.`);
}
});
return <TreeRenderer {...state} />;
}
#607: Added dataSourceChanged option to reloadTree function retuned by useTree and useUnifiedSelectionTree. It allows to specify that data used to build the tree might have changed and need to be repulled when reloading the hierarchy.
import { registerTxnListeners } from "@itwin/presentation-core-interop";
function MyTree({ imodel, ...props}: Props) {
const { reloadTree, treeProps } = useTree(props);
useEffect(() => {
// listen for changes in iModel and reload tree
return registerTxnListeners(imodel.txns, () => {
reloadTree({ dataSourceChanged: true });
});
}, [imodel, reloadTree]);
return <TreeRenderer {...treeProps} />;
}
@itwin/presentation-components@5.3.2
Patch Changes
#609: Fixed shift select not selecting nodes that are not yet loaded in UnifiedSelectionTreeEventHandler.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.
Releases
@itwin/presentation-hierarchies-react@0.3.0
Minor Changes
#605: Added
onHierarchyLimitExceeded
callback touseTree
anduseUnifiedSelectionTree
for tracking when hierarchy level exceeds the limit.#607: Added
dataSourceChanged
option toreloadTree
function retuned byuseTree
anduseUnifiedSelectionTree
. It allows to specify that data used to build the tree might have changed and need to be repulled when reloading the hierarchy.@itwin/presentation-components@5.3.2
Patch Changes
UnifiedSelectionTreeEventHandler
.@itwin/presentation-testing@5.0.10
Patch Changes