diff --git a/CHANGELOG.md b/CHANGELOG.md index 9de44dce2dd..b395fe3bff1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ **Bug fixes** - Fixed invalid `aria-desribedby` values set by `EuiToolTip` ([#2156](https://github.com/elastic/eui/pull/2156)) +- Added `"center"` as an acceptable value to `EuiBasicTable`'s `align` proptype ([#2158](https://github.com/elastic/eui/pull/2158)) ## [`13.0.0`](https://github.com/elastic/eui/tree/v13.0.0) diff --git a/src-docs/src/views/tables/basic/props_info.js b/src-docs/src/views/tables/basic/props_info.js index f10a61b0b40..834274aaceb 100644 --- a/src-docs/src/views/tables/basic/props_info.js +++ b/src-docs/src/views/tables/basic/props_info.js @@ -250,7 +250,7 @@ export const propsInfo = { value: '"right"', comment: 'May change when "dataType" is defined', }, - type: { name: '"left" | "right"' }, + type: { name: '"left" | "center" | "right"' }, }, truncateText: { description: diff --git a/src/components/basic_table/basic_table.js b/src/components/basic_table/basic_table.js index 0e3eb27e9b7..22ae37c2b43 100644 --- a/src/components/basic_table/basic_table.js +++ b/src/components/basic_table/basic_table.js @@ -8,8 +8,9 @@ import { formatNumber, formatText, LEFT_ALIGNMENT, - PropertySortType, + CENTER_ALIGNMENT, RIGHT_ALIGNMENT, + PropertySortType, SortDirection, } from '../../services'; import { isFunction } from '../../services/predicate'; @@ -113,7 +114,7 @@ export const FieldDataColumnTypeShape = { dataType: PropTypes.oneOf(DATA_TYPES), width: PropTypes.string, sortable: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]), - align: PropTypes.oneOf([LEFT_ALIGNMENT, RIGHT_ALIGNMENT]), + align: PropTypes.oneOf([LEFT_ALIGNMENT, CENTER_ALIGNMENT, RIGHT_ALIGNMENT]), truncateText: PropTypes.bool, render: PropTypes.func, // ((value, record) => PropTypes.node (also see [services/value_renderer] for basic implementations) footer: PropTypes.oneOfType([