diff --git a/example/src/Examples/DataTableExample.tsx b/example/src/Examples/DataTableExample.tsx index fe0fe8a0c4..69858746c2 100644 --- a/example/src/Examples/DataTableExample.tsx +++ b/example/src/Examples/DataTableExample.tsx @@ -60,9 +60,9 @@ const DataTableExample = () => { const sortedItems = items .slice() .sort((item1, item2) => - (sortAscending ? item1.name < item2.name : item2.name < item1.name) - ? 1 - : -1 + sortAscending + ? item1.name.localeCompare(item2.name) + : item2.name.localeCompare(item1.name) ); const from = page * itemsPerPage; const to = Math.min((page + 1) * itemsPerPage, items.length); @@ -83,7 +83,9 @@ const DataTableExample = () => { > Dessert - Calories + + Calories per piece + Fat (g) diff --git a/src/components/DataTable/DataTableHeader.tsx b/src/components/DataTable/DataTableHeader.tsx index e1e2419e36..f59651bca8 100644 --- a/src/components/DataTable/DataTableHeader.tsx +++ b/src/components/DataTable/DataTableHeader.tsx @@ -78,7 +78,6 @@ DataTableHeader.displayName = 'DataTable.Header'; const styles = StyleSheet.create({ header: { flexDirection: 'row', - height: 48, paddingHorizontal: 16, borderBottomWidth: StyleSheet.hairlineWidth * 2, }, diff --git a/src/components/__tests__/__snapshots__/DataTable.test.tsx.snap b/src/components/__tests__/__snapshots__/DataTable.test.tsx.snap index 1cec04437d..ea65a6bea9 100644 --- a/src/components/__tests__/__snapshots__/DataTable.test.tsx.snap +++ b/src/components/__tests__/__snapshots__/DataTable.test.tsx.snap @@ -67,7 +67,6 @@ exports[`renders data table header 1`] = ` Object { "borderBottomWidth": 1, "flexDirection": "row", - "height": 48, "paddingHorizontal": 16, }, Object {