~javiljoen/shopping-list

a30e9788256a2cb7c795bbc2cd714dcc6dd444a1 — JA Viljoen 4 years ago f335683
Extend display to multiple items
1 files changed, 15 insertions(+), 7 deletions(-)

M public/index.html
M public/index.html => public/index.html +15 -7
@@ 20,7 20,7 @@
          </tr>
        </thead>
        <tbody>
          <tr>
          <tr v-for="item in items">
            <td>{{ item.priority | priorityToString }}</td>
            <td>{{ item.section | titleCase }}</td>
            <td>{{ item.name | titleCase }}</td>


@@ 37,12 37,20 @@
        el: "#app",
        data: {
          heading: "items",
          item: {
            id: 0,
            priority: 1,
            section: "produce",
            name: "apples"
          }
          items: [
            {
              id: 0,
              priority: 1,
              section: "produce",
              name: "apples"
            },
            {
              id: 1,
              priority: 2,
              section: "pantry",
              name: "coffee beans"
            }
          ]
        },
        filters: {
          titleCase: s => s.charAt(0).toUpperCase() + s.slice(1),