---
name: "SmartGroupModel.onInitialized"
mode: "api"
versionRequirements:
  - { name: "@ray-js/panel-sdk", version: "1.5.0" }
title: "onInitialized"
---

## SmartGroupModel.onInitialized

> [VERSION] @ray-js/panel-sdk >= 1.5.0

### Description

Register a callback for the smart group model initialized event

### Parameters

`(listener: Function)`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `listener` | `(instance: SmartGroupModel) => void` | Yes | Callback invoked after initialization, receiving the current group instance as an argument |

### Return Value

None


### Examples

#### Example

```typescript
const id = group.onInitialized((instance) => {
  console.log('Group initialized', instance.getGroupInfo().name);
});
```
