ember-group-by
ember-group-by copied to clipboard
groupBy live reloading?
I was wondering if it would be possible to use the group by functionality and have it automatically update its content when a new model gets added to the store?
Can you provide an example of what you mean?
@HeroicEric sure! I should've included that in the original writeup.
I have a grouped list...
When I create a new record, it does not automatically get added to the list. I must refresh the page in order to see the new grouped record appear.
This is the code in my ArrayController:
documentFormatsByCategory: groupBy('model', 'category')
Hmm. How are you creating the new record?
I have an action in my controller that creates it using Ember data and form fields.
actions:
createDocumentFormat: ->
fields = @get('fields')
fields.organization_id = @get('controllers.application.selectedOrgId')
fields.category = @get('selectedDocumentFormatType')
format = @store.createRecord 'document_format', fields
format.save().then (format) =>
@transitionToRoute 'document_formats'
I need this as well, any update on how to accomplish this?