@omnigrid/selection-plugin 0.1.12 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -55,7 +55,7 @@ selection is available only in `"multiple"` mode.
55
55
  ## Links
56
56
 
57
57
  - **Source:** https://github.com/KRZK-Apps/omnigrid/tree/main/plugins/base/selection
58
- - **Demo:** https://omnigrid.cc/
58
+ - **Demo:** https://omnigrid.cc/demo/react/plugins/base/selection
59
59
  - **Issues:** https://github.com/KRZK-Apps/omnigrid/issues
60
60
 
61
61
  ## License
package/dist/index.js CHANGED
@@ -432,6 +432,7 @@ export class SelectionPlugin {
432
432
  this.api.setState((prev) => ({ ...prev, selection: this.getSelectionState() }));
433
433
  this.api.refresh();
434
434
  this.onSelectionChange?.(this.getSelectionState());
435
+ this.api.emit("selection:change", this.getSelectionState());
435
436
  }
436
437
  validateSelection() {
437
438
  if (!this.api)
package/dist/types.d.ts CHANGED
@@ -65,4 +65,8 @@ declare module "@omnigrid/core" {
65
65
  /** Clears the current selection. */
66
66
  clearSelection?: () => void;
67
67
  }
68
+ interface GridEvents<T> {
69
+ /** Fired when the selected rows change. Payload is the new selection state. */
70
+ "selection:change": SelectionState<T>;
71
+ }
68
72
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omnigrid/selection-plugin",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "Headless row selection plugin for OmniGrid",
5
5
  "keywords": [
6
6
  "omnigrid",