From 6c3cdd6e201e126bffa0024ee046532b851b82e8 Mon Sep 17 00:00:00 2001 From: Noelle Daley Date: Fri, 10 Jan 2020 16:48:48 -0800 Subject: [PATCH] Fix delete namespaces (#8132) * do not access items.content since it turns items into an InternalModel and breaks deleting namespaces * remove pagination story until we have a better way to fake data in Storybook --- ui/lib/core/addon/templates/components/list-view.hbs | 2 +- ui/lib/core/stories/list-view.stories.js | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) 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}} 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)