diff --git a/src-docs/src/views/datagrid/datagrid_example.js b/src-docs/src/views/datagrid/datagrid_example.js index bd141e6163..02004839ed 100644 --- a/src-docs/src/views/datagrid/datagrid_example.js +++ b/src-docs/src/views/datagrid/datagrid_example.js @@ -120,29 +120,29 @@ const gridSnippet = ` header: 'shade', }} // Optional. Provide additional schemas to use in the grid. - // This schema 'franchise' essentially acts like a boolean, looking for Star Wars or Star Trek in a column. + // This schema 'franchise' essentially acts like a boolean, looking for Oranges or Apples in a column. schemaDetectors={[ { 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() === 'star wars' || - value.toLowerCase() === 'star trek' + 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() === 'star wars'; - const bValue = b.toLowerCase() === 'star wars'; + 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: 'Star Wars-Star Trek', + sortTextAsc: 'Oranges-Apples', // Text for what the DESC sort does. - sortTextDesc: 'Star Trek-Star Wars', + sortTextDesc: 'Apples-Oranges', // OuiIcon or Token to signify this schema. icon: 'star', // The color to use for the icon token. diff --git a/src-docs/src/views/datagrid/schema.js b/src-docs/src/views/datagrid/schema.js index 7832a3c91b..d763c401be 100644 --- a/src-docs/src/views/datagrid/schema.js +++ b/src-docs/src/views/datagrid/schema.js @@ -52,7 +52,7 @@ for (let i = 1; i < 5; i++) { let json; let franchise; if (i < 3) { - franchise = 'Star Wars'; + franchise = 'Oranges'; json = JSON.stringify([ { default: fake('{{name.lastName}}, {{name.firstName}} {{name.suffix}}'), @@ -64,7 +64,7 @@ for (let i = 1; i < 5; i++) { }, ]); } else { - franchise = 'Star Trek'; + franchise = 'Apples'; json = JSON.stringify([ { name: fake('{{name.lastName}}, {{name.firstName}} {{name.suffix}}'), @@ -87,26 +87,26 @@ const Franchise = (props) => { return (