-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
images and components for new Griddle example using vehicleData
Also fix of some noticed bugs
- Loading branch information
Nathan Trost
authored and
Nathan Trost
committed
Jun 9, 2016
1 parent
e4ad451
commit f09802b
Showing
40 changed files
with
333 additions
and
272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
module.exports = { | ||
vehicleData: [ | ||
{ | ||
'id': 0, | ||
'Image': '../vehicles/ford-taurus-16.jpg', | ||
'Make': 'Ford', | ||
'Model': 'Taurus', | ||
'Year': '2016', | ||
'Price': '$27,110' | ||
}, | ||
{ | ||
'id': 1, | ||
'Image': '../vehicles/acura-rdx-08.jpg', | ||
'Make': 'Acura', | ||
'Model': 'RDX', | ||
'Year': '2008', | ||
'Price': '$17,998' | ||
}, | ||
{ | ||
'id': 2, | ||
'Image': '../vehicles/cadillac-cts-09.jpg', | ||
'Make': 'Cadillac', | ||
'Model': 'CTS', | ||
'Year': '2009', | ||
'Price': '$17,599' | ||
}, | ||
{ | ||
'id': 3, | ||
'Image': '../vehicles/bmw-335XI-11.jpg', | ||
'Make': 'BMW', | ||
'Model': '335 XI', | ||
'Year': '2011', | ||
'Price': '$22,998' | ||
}, | ||
{ | ||
'id': 4, | ||
'Image': '../vehicles/buick-lacrosse-12.jpg', | ||
'Make': 'Buick', | ||
'Model': 'LaCrosse', | ||
'Year': '2012', | ||
'Price': '$16,998' | ||
}, | ||
{ | ||
'id': 5, | ||
'Image': '../vehicles/audi-q7premium-11.jpg', | ||
'Make': 'Audi', | ||
'Model': 'Q7 Premium', | ||
'Year': '2011', | ||
'Price': '$29,998' | ||
}, | ||
{ | ||
'id': 6, | ||
'Image': '../vehicles/chevrolet-hhrlt-06.jpg', | ||
'Make': 'Chevrolet', | ||
'Model': 'HHR LT', | ||
'Year': '2006', | ||
'Price': '$8,998' | ||
}, | ||
{ | ||
'id': 7, | ||
'Image': '../vehicles/dodge-dartgt-14.jpg', | ||
'Make': 'Dodge', | ||
'Model': 'Dart Gt', | ||
'Year': '2014', | ||
'Price': '$16,998' | ||
}, | ||
{ | ||
'id': 8, | ||
'Image': '../vehicles/dodge-durangosxt-14.jpg', | ||
'Make': 'Dodge', | ||
'Model': 'Durango SXT', | ||
'Year': '2014', | ||
'Price': '$24,998' | ||
}, | ||
{ | ||
'id': 9, | ||
'Image': '../vehicles/fiat-500abarth-13.jpg', | ||
'Make': 'Fiat', | ||
'Model': '500 Abarth', | ||
'Year': '2013', | ||
'Price': '$13,998' | ||
}, | ||
{ | ||
'id': 10, | ||
'Image': '../vehicles/gmc-terrainsle-13.jpg', | ||
'Make': 'GMC', | ||
'Model': 'Terrain SLE', | ||
'Year': '2013', | ||
'Price': '$18,998' | ||
}, | ||
{ | ||
'id': 11, | ||
'Image': '../vehicles/hyundai-sonatase-13.jpg', | ||
'Make': 'Hyundai', | ||
'Model': 'Sonata SE', | ||
'Year': '2013', | ||
'Price': '$16,998' | ||
}, | ||
{ | ||
'id': 12, | ||
'Image': '../vehicles/hyundai-sonatasport-14.jpg', | ||
'Make': 'Hyundai', | ||
'Model': 'Sonata Sport', | ||
'Year': '2014', | ||
'Price': '$20,599' | ||
}, | ||
{ | ||
'id': 13, | ||
'Image': '../vehicles/infiniti-jx35-13.jpg', | ||
'Make': 'Infiniti', | ||
'Model': 'JX35', | ||
'Year': '2013', | ||
'Price': '$30,998' | ||
}, | ||
{ | ||
'id': 14, | ||
'Image': '../vehicles/jeep-compasslatitude-14.jpg', | ||
'Make': 'Jeep', | ||
'Model': 'Compass Latitude', | ||
'Year': '2014', | ||
'Price': '$17,998' | ||
} | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
//Griddle Custom Components | ||
import GriddleResponsiveHeader from '../components/griddle-responsive-header'; | ||
import GriddleCell from '../components/griddle-cell'; | ||
import GriddleAvatar from '../components/griddle-avatar'; | ||
import GriddleCustomHeader from '../components/griddle-custom-header'; | ||
|
||
module.exports = { | ||
columnMeta: [ | ||
{ | ||
"columnName": "Make", | ||
"order": 0, | ||
"sortable": true, | ||
"locked": false, | ||
"visible": true, | ||
"customComponent": GriddleResponsiveHeader, | ||
"responsiveHeaderProps": {"right": "Model"}, | ||
"displayName": "Make", | ||
"customHeaderComponent": GriddleCustomHeader, | ||
"customHeaderComponentProps": {"sortable": true} | ||
}, | ||
{ | ||
"columnName": "id", | ||
"order": 1, | ||
"sortable": true, | ||
"locked": false, | ||
"visible": false, | ||
"customComponent": GriddleCell, | ||
"displayName": "ID", | ||
"customHeaderComponent": GriddleCustomHeader, | ||
"customHeaderComponentProps": {"sortable": true} | ||
}, | ||
{ | ||
"columnName": "Model", | ||
"order": 2, | ||
"sortable": true, | ||
"locked": false, | ||
"visible": true, | ||
"customComponent": GriddleCell, | ||
"displayName": "Model", | ||
"cssClassName": "griddle__responsive-hide", | ||
"customHeaderComponent": GriddleCustomHeader, | ||
"customHeaderComponentProps": {"sortable": true} | ||
}, | ||
{ | ||
"columnName": "Year", | ||
"order": 3, | ||
"sortable": true, | ||
"locked": false, | ||
"visible": true, | ||
"customComponent": GriddleCell, | ||
"displayName": "Year", | ||
"customHeaderComponent": GriddleCustomHeader, | ||
"customHeaderComponentProps": {"sortable": true} | ||
}, | ||
{ | ||
"columnName": "Image", | ||
"order": 4, | ||
"sortable": true, | ||
"locked": false, | ||
"visible": true, | ||
"customComponent": GriddleAvatar, | ||
"displayName": "Image", | ||
"customHeaderComponent": GriddleCustomHeader, | ||
"customHeaderComponentProps": {"sortable": false} | ||
}, | ||
{ | ||
"columnName": "Price", | ||
"order": 5, | ||
"sortable": true, | ||
"locked": false, | ||
"visible": true, | ||
"customComponent": GriddleCell, | ||
"displayName": "Price", | ||
"customHeaderComponent": GriddleCustomHeader, | ||
"customHeaderComponentProps": {"sortable": true} | ||
} | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import React, { PropTypes, Component } from 'react'; | ||
|
||
//Bootstrap Components | ||
import { Panel, Thumbnail, Glyphicon } from 'react-bootstrap'; | ||
|
||
//Griddle Components | ||
import Griddle from 'griddle-react'; | ||
|
||
//Griddle Custom Components | ||
|
||
import GriddleCustomPager from '../components/griddle-custom-pager'; | ||
|
||
const vehicleData = require('../api/vehicleData').vehicleData; | ||
const columnMeta = require('../griddle-meta/vehicleDataMeta').columnMeta; | ||
|
||
export default class AppGriddleVehicles extends Component { | ||
constructor(props) { | ||
super(props); | ||
} | ||
|
||
render() { | ||
return ( | ||
<div> | ||
<h2>Vehicle Data</h2> | ||
<Panel> | ||
<Griddle | ||
useGriddleStyles={false} | ||
tableClassName="griddle-test-table" | ||
results={vehicleData} | ||
|
||
columnMetadata={columnMeta} | ||
|
||
columns={[ "Make", "Model", "Year", "Price", "Image" ]} | ||
initialSort="name" | ||
sortAscendingComponent={<small className="griddle__header-sort-icon"><Glyphicon glyph="chevron-up" /></small>} | ||
sortDescendingComponent={<small className="griddle__header-sort-icon"><Glyphicon glyph="chevron-down" /></small>} | ||
|
||
nextIconComponent={<Glyphicon glyph="chevron-right" />} | ||
previousIconComponent={<Glyphicon glyph="chevron-left" />} | ||
settingsToggleClassName="btn btn-primary" | ||
|
||
nextText={""} | ||
previousText={""} | ||
|
||
|
||
useCustomPagerComponent={true} | ||
customPagerComponent={GriddleCustomPager} | ||
|
||
showFilter={true} | ||
showSettings={true} | ||
|
||
/> | ||
</Panel> | ||
</div> | ||
); | ||
} | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.