Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update guide additional steps for 16.1.x to 17.0.x #3973

Merged
merged 7 commits into from
Nov 9, 2023
Merged
Changes from 1 commit
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
38 changes: 38 additions & 0 deletions en/components/general/update-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,44 @@ Unfortunately not all changes can be automatically updated. Changes below are sp

For example: if you are updating from version 6.2.4 to 7.1.0 you'd start from the "From 6.x .." section apply those changes and work your way up:

## From 16.1.x to 17.0.x

kdinev marked this conversation as resolved.
Show resolved Hide resolved
- **Breaking change**
- `selectionChanging` arguments type is changed. Now the `oldSelection`, `newSelection`, `added` and `removed` collections, part of the `IComboSelectionChangingEventArgs` interface, no longer consist of the keys of the selected items (when the combo has set a `valueKey`), but now in any case the items are emitted. When the combo is working with remote data and a `valueKey` is set - for the selected items that are not currently part of combo view, a partial item data object will be emitted.

If your code in `selectionChanging` event handler was depending on reading `valueKeys` from the event argument, update it as follows:

```typescript
// prior version 15.1.x
wnvko marked this conversation as resolved.
Show resolved Hide resolved
public handleSelectionChanging(e: IComboSelectionChangingEventArgs): void {
this.selectedItems = e.newSelection;
}

// after version 15.1.x
wnvko marked this conversation as resolved.
Show resolved Hide resolved
public handleSelectionChanging(e: IComboSelectionChangingEventArgs): void {
this.selectedItems = e.newSelection.map(i => {
return i[e.owner?.valueKey]
});
}
```

- **Breaking change**
- `selectionChanging` arguments type is changed. Now the `oldSelection`, `newSelection`, `added` and `removed` collections, part of the `ISimpleComboSelectionChangingEventArgs` interface, no longer consist of the keys of the selected items (when the simple combo has set a `valueKey`), but now in any case the items are emitted.

If your code in `selectionChanging` event handler was depending on reading `valueKey` from the event argument, update it as follows:

```typescript
// prior version 15.1.x
public handleSelectionChanging(e: ISimpleComboSelectionChangingEventArgs): void {
this.selectedItem = e.newSelection[0];
}

// after version 15.1.x
public handleSelectionChanging(e: ISimpleComboSelectionChangingEventArgs): void {
this.selectedItem = e.newSelection[0][e.owner?.valueKey];
}
```

## From 16.0.x to 16.1.x

### General
Expand Down
Loading