Skip to content

Instantly share code, notes, and snippets.

@jsdbroughton
Created February 16, 2020 20:47
Show Gist options
  • Save jsdbroughton/bdfe4ee90e57b152d11995d600017fa2 to your computer and use it in GitHub Desktop.
Save jsdbroughton/bdfe4ee90e57b152d11995d600017fa2 to your computer and use it in GitHub Desktop.
const uniqueIds: Set<number> = new Set();
let lastId = 1;
// All treeviewItems
treeItems.forEach( ( item ): void => {
if ( item && item.data ) {
uniqueIds.add( item.data.uniqueId );
lastId += 1;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment