From a0e4add2f86746e67fd1796efc79659bbede9661 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sun, 31 Mar 2019 23:01:14 -0300 Subject: [PATCH 1/2] docs(table): make examples work better on small screens Reduces columns used, and adds responsive tables where needed --- src/components/table/README.md | 39 ++++++++++++---------------------- 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/src/components/table/README.md b/src/components/table/README.md index 00200c73c99..5d325e75361 100644 --- a/src/components/table/README.md +++ b/src/components/table/README.md @@ -17,10 +17,10 @@ data() { return { items: [ - { isActive: true, age: 40, first_name: 'Dickerson', last_name: 'Macdonald' }, - { isActive: false, age: 21, first_name: 'Larsen', last_name: 'Shaw' }, - { isActive: false, age: 89, first_name: 'Geneva', last_name: 'Wilson' }, - { isActive: true, age: 38, first_name: 'Jami', last_name: 'Carney' } + { age: 40, first_name: 'Dickerson', last_name: 'Macdonald' }, + { age: 21, first_name: 'Larsen', last_name: 'Shaw' }, + { age: 89, first_name: 'Geneva', last_name: 'Wilson' }, + { age: 38, first_name: 'Jami', last_name: 'Carney' } ] } } @@ -88,23 +88,21 @@ modifier properties (make sure your field keys do not conflict with these names) data() { return { items: [ - { isActive: true, age: 40, first_name: 'Dickerson', last_name: 'Macdonald' }, - { isActive: false, age: 21, first_name: 'Larsen', last_name: 'Shaw' }, + { age: 40, first_name: 'Dickerson', last_name: 'Macdonald' }, + { age: 21, first_name: 'Larsen', last_name: 'Shaw' }, { - isActive: false, age: 89, first_name: 'Geneva', last_name: 'Wilson', _rowVariant: 'danger' }, { - isActive: true, age: 40, first_name: 'Thor', last_name: 'MacDonald', - _cellVariants: { isActive: 'success', age: 'info', first_name: 'warning' } + _cellVariants: { age: 'info', first_name: 'warning' } }, - { isActive: false, age: 29, first_name: 'Dick', last_name: 'Dunlap' } + { age: 29, first_name: 'Dick', last_name: 'Dunlap' } ] } } @@ -243,7 +241,7 @@ typically be in the order they were defined in the object, although **field orde ```html @@ -251,7 +249,7 @@ typically be in the order they were defined in the object, although **field orde export default { data() { return { - // Note 'isActive' is left out and will not appear in the rendered table + // Note 'age' is left out and will not appear in the rendered table fields: { last_name: { label: 'Person last name', @@ -261,14 +259,9 @@ typically be in the order they were defined in the object, although **field orde label: 'Person first name', sortable: false }, - foo: { - // This key overrides `foo`! - key: 'age', - label: 'Person age', - sortable: true - }, city: { key: 'address.city', + label: 'City', sortable: true }, 'address.country': { @@ -278,28 +271,24 @@ typically be in the order they were defined in the object, although **field orde }, items: [ { - isActive: true, age: 40, first_name: 'Dickerson', last_name: 'Macdonald', address: { country: 'USA', city: 'New York' } }, { - isActive: false, age: 21, first_name: 'Larsen', last_name: 'Shaw', address: { country: 'Canada', city: 'Toronto' } }, { - isActive: false, age: 89, first_name: 'Geneva', last_name: 'Wilson', address: { country: 'Australia', city: 'Sydney' } }, { - isActive: true, age: 38, first_name: 'Jami', last_name: 'Carney', @@ -662,9 +651,6 @@ following custom CSS: ```css /* Busy table styling */ -table.b-table[aria-busy='false'] { - opacity: 1; -} table.b-table[aria-busy='true'] { opacity: 0.6; } @@ -818,7 +804,7 @@ field(s) in the scoped slot(s). ```html