Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .changeset/good-ghosts-dress.md

This file was deleted.

24 changes: 24 additions & 0 deletions packages/unified-selection/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# @itwin/unified-selection

## 1.8.0

### Minor Changes

- [#1396](https://github.com/iTwin/presentation/pull/1396): Expose `CLEAR_SELECTION_STORAGE_SOURCE` constant that is used as selection change event source when selection storage is cleared. This should allow consumers to detect when selection change happened due to selection storage being cleared.

```ts
import {
createStorage,
CLEAR_SELECTION_STORAGE_SOURCE,
} from "@itwin/unified-selection";

const storage = createStorage();
storage.selectionChangeEvent.addListener((args) => {
if (args.source === CLEAR_SELECTION_STORAGE_SOURCE) {
// ignore change if it was caused by clearing selection storage
}
// handle selection change
});

// this will trigger the `selectionChangeEvent` with `{ source: CLEAR_SELECTION_STORAGE_SOURCE }`
storage.clearStorage({ imodelKey: imodel.key });
```

## 1.7.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/unified-selection/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@itwin/unified-selection",
"version": "1.7.6",
"version": "1.8.0",
"description": "Package for managing unified selection in iTwin.js applications.",
"license": "MIT",
"repository": {
Expand Down
Loading