Skip to content

Commit

Permalink
Updated the text
Browse files Browse the repository at this point in the history
Signed-off-by: AbhishekReddy1127 <[email protected]>
  • Loading branch information
AbhishekReddy1127 committed Feb 27, 2023
1 parent 2543a0b commit 10da2d1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions src-docs/src/views/datagrid/datagrid_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,21 +126,21 @@ const gridSnippet = `
type: 'franchise',
// Try to detect if column data is this schema. A value of 1 is the highest possible. A (mean_average - standard_deviation) of .5 will be good enough for the autodetector to assign.
detector(value) {
return value.toLowerCase() === 'Oranges' ||
value.toLowerCase() === 'Apples'
return value.toLowerCase() === 'oranges' ||
value.toLowerCase() === 'apples'
? 1
: 0;
},
// How we should sort data matching this schema. Again, a value of 1 is the highest value.
comparator(a, b, direction) {
const aValue = a.toLowerCase() === 'Oranges';
const bValue = b.toLowerCase() === 'Oranges';
const aValue = a.toLowerCase() === 'oranges';
const bValue = b.toLowerCase() === 'oranges';
if (aValue < bValue) return direction === 'asc' ? 1 : -1;
if (aValue > bValue) return direction === 'asc' ? -1 : 1;
return 0;
},
// Text for what the ASC sort does.
sortTextAsc: 'No data available-Apples',
sortTextAsc: 'Oranges-Apples',
// Text for what the DESC sort does.
sortTextDesc: 'Apples-Oranges',
// OuiIcon or Token to signify this schema.
Expand Down
12 changes: 6 additions & 6 deletions src-docs/src/views/datagrid/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const Franchise = (props) => {
return (
<div>
<OuiTitle size="s">
<h3>{props.name} Oranges </h3>
<h3>{props.name}</h3>
</OuiTitle>
<OuiSpacer size="s" />
{props.name === 'Oranges' ? (
Expand All @@ -105,7 +105,7 @@ const Franchise = (props) => {
size="m"
hasShadow
caption="Random Apples image"
alt="Random trek image"
alt="Random Apples image"
url="https://source.unsplash.com/600x600/?apples"
/>
)}
Expand Down Expand Up @@ -193,14 +193,14 @@ const DataGridSchema = () => {
type: 'favoriteFranchise',
textTransform: 'capitalize',
detector(value) {
return value.toLowerCase() === 'Oranges' ||
value.toLowerCase() === 'Apples'
return value.toLowerCase() === 'oranges' ||
value.toLowerCase() === 'apples'
? 1
: 0;
},
comparator(a, b, direction) {
const aValue = a.toLowerCase() === 'Oranges';
const bValue = b.toLowerCase() === 'Oranges';
const aValue = a.toLowerCase() === 'oranges';
const bValue = b.toLowerCase() === 'oranges';
if (aValue < bValue) return direction === 'asc' ? 1 : -1;
if (aValue > bValue) return direction === 'asc' ? -1 : 1;
return 0;
Expand Down

0 comments on commit 10da2d1

Please sign in to comment.