From c8ea4f43bb3fde8f70fea5ac41cf657f68af62bf Mon Sep 17 00:00:00 2001 From: Noelle Daley Date: Fri, 10 Jan 2020 10:43:27 -0800 Subject: [PATCH 1/2] do not access items.content since it turns items into an InternalModel and breaks deleting namespaces --- ui/lib/core/addon/templates/components/list-view.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/lib/core/addon/templates/components/list-view.hbs b/ui/lib/core/addon/templates/components/list-view.hbs index a24c01576c10..4af63729dfb1 100644 --- a/ui/lib/core/addon/templates/components/list-view.hbs +++ b/ui/lib/core/addon/templates/components/list-view.hbs @@ -5,7 +5,7 @@ ) }}
- {{#each (or items.content items) as |item|}} + {{#each items as |item|}} {{yield (hash item=item)}} {{else}} {{yield}} From f2595df48fb1de7048018b67387d573b8b56aa3e Mon Sep 17 00:00:00 2001 From: Noelle Daley Date: Fri, 10 Jan 2020 16:11:19 -0800 Subject: [PATCH 2/2] remove pagination story until we have a better way to fake data in Storybook --- ui/lib/core/stories/list-view.stories.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/ui/lib/core/stories/list-view.stories.js b/ui/lib/core/stories/list-view.stories.js index fbe1c5ba0745..564f53ea4e8e 100644 --- a/ui/lib/core/stories/list-view.stories.js +++ b/ui/lib/core/stories/list-view.stories.js @@ -12,20 +12,11 @@ filtered.set('meta', { total: 100, }); -let paginated = ArrayProxy.create({ - content: [{ id: 'middle' }, { id: 'of' }, { id: 'the' }, { id: 'list' }], -}); -paginated.set('meta', { - lastPage: 10, - currentPage: 4, - total: 100, -}); - +// TODO: add a pagination option when we have a better way to fake Ember models in Storybook. let options = { list: [{ id: 'one' }, { id: 'two' }], empty: [], filtered, - paginated, }; storiesOf('ListView/', module)