leekelleher / umbraco-contentment

Contentment for Umbraco - a state of happiness and satisfaction
https://marketplace.umbraco.com/package/umbraco.community.contentment
Mozilla Public License 2.0
157 stars 72 forks source link

DataPicker - Fixed `async` support for Search pagination #303

Closed nzdev closed 1 year ago

nzdev commented 1 year ago

Description

Fix async support for data picker as out parameters cannot be used with the async keyword.

Related Issues?

Types of changes

Checklist

leekelleher commented 1 year ago

Thanks @nzdev, I wasn't aware that the out (and ref) couldn't be used with async - everyday's a school day!

I'm thinking that instead of introducing the DataPickerSearchResults class, I'd like to reuse Umbraco's PagedResult<T> class, e.g. PagedResult<DataPickerItem>. It does pretty much the same thing.

I've been tinkering around with the code, I'll add a commit to your branch (this PR).