emberjs / list-view

An incremental rendering list view for Ember.js
MIT License
465 stars 116 forks source link

Using components with ListView #243

Closed oskarrough closed 7 years ago

oskarrough commented 9 years ago

Hi, I'd like to create a list view that renders a component instead of a view.

Is that possible or should you rather use the {{ember-list}} helper? If so, instructions would also be appreciated. Thanks!

import Ember from 'ember';
import ListView from 'ember-list-view';
import ListItemView from 'ember-list-view/list-item-view';
import TrackItemComponent from 'my-app/components/track-item/component';

export default ListView.extend({
    height: 550,
    rowHeight: 40,
    //itemViewClass: ListItemView.extend({ templateName: 'about' })
    itemViewClass: /* somehow specify a component here? */
});
tim-evans commented 9 years ago

A component is a view, but I think there may be some corner cases around this. I would recommend that you simply use a component in the template rather than the view declaration. @stefanpenner thoughts?

shishirmk commented 9 years ago

Looking to solve a similar scenario.

rwjblue commented 7 years ago

I'm sorry we didn't get back to this previously, but at this point this repo is essentially unmaintained. Please use @html-next/vertical-collection or ember-collection for similar functionality.

Closing...