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

Extend so data picker can have distinct items picked #410

Open brannmark opened 2 months ago

brannmark commented 2 months ago

Which Contentment version are you using?

4.7.0

Which Umbraco version are you using? For example: 13.2.1 - don't just write v13

13.4.1

Bug summary

Make it possible to have distinct values in data picker. Would be nice if picked data items is passed into a custom data source so one can if needed make sure that those values that are already picked is not returned as data items back to the UI.

public async Task<Umbraco.Cms.Core.Models.PagedResult<DataListItem>> SearchAsync(Dictionary<string, object> config, int pageNumber = 1, int pageSize = 12, string query = "", **IEnumerable<DataListItem> pickedDataListItems**)

Steps to reproduce

Pick items in a data picker. Open to pick again, same items can be picked as they are returned from data source.

Expected result / actual result

Would like to filter the data items returned based on already picked items.

Do you have Umbraco ModelsBuilder enabled?

What browsers are you seeing the problem on?

Chrome, Edge, Firefox, Safari

iliyan-kulishev commented 2 months ago

Yes. I was literally searching the docs for ways of doing this.