From 783f1ead5ee0f91e59bc674774b8b19da9f860ed Mon Sep 17 00:00:00 2001 From: Anthony Panozzo Date: Tue, 15 Dec 2015 20:35:27 -0500 Subject: [PATCH] Add menu items to select fields documentation I looked at the examples online and had a tough time understanding what the format of `menuItems` was. I dug into the source of the page that rendered that example and figured out what the value should be. Then I added this code where it would be seen. I'm not sure if this is the right format but thought it might be a step in the right direction. --- .../raw-code/select-fields-code.txt | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/src/app/components/raw-code/select-fields-code.txt b/docs/src/app/components/raw-code/select-fields-code.txt index 3a77a95de30079..de4e92977a1dc7 100644 --- a/docs/src/app/components/raw-code/select-fields-code.txt +++ b/docs/src/app/components/raw-code/select-fields-code.txt @@ -1,3 +1,26 @@ +let menuItems = [ + {payload: '1', text: 'Never'}, + {payload: '2', text: 'Every Night'}, + {payload: '3', text: 'Weeknights'}, + {payload: '4', text: 'Weekends'}, + {payload: '5', text: 'Weekly'}, +]; + +let arbitraryArrayMenuItems = [ + {id:1, name:'Never'}, + {id:2, name:'Every Night'}, + {id:3, name:'Weeknights'}, + {id:4, name:'Weekends'}, + {id:5, name:'Weekly'}, +]; + +let menuItemsWithLabel = [ + {payload: '1', text: 'Morning', period: '5 am - 12 pm'}, + {payload: '2', text: 'Afternoon', period: '12 pm - 5 pm'}, + {payload: '3', text: 'Evening', period: '5 pm to 9 pm'}, + {payload: '4', text: 'Night', period: '9 pm to 4 am'}, +]; +