neomjs / neo

The application worker driven frontend framework
https://neomjs.com
MIT License
2.83k stars 151 forks source link

selection.Model: select() => add support for widgets using a collection instead of a store #5598

Open tobiu opened 1 month ago

tobiu commented 1 month ago

example: form.field.Time => creates a collection (can be discussed if it should be a store instead).

        items = (items = Array.isArray(items) ?
            items: [items]).map(item => item.isRecord ? view.getItemId(item) : Neo.isObject(item) ? item.id : item);

=> we need view.getItemId(item) for collection items as well.

inside the TimeField i added the hack to give items the isRecord flag as a workaround for now.