From 01347ee45a36a411be53dc369f22f985708df146 Mon Sep 17 00:00:00 2001 From: Jen Huang Date: Thu, 22 Mar 2018 10:22:31 -0700 Subject: [PATCH] Specify widths on table columns to support long field names --- .../components/table/__tests__/__snapshots__/table.test.js.snap | 2 ++ .../indexed_fields_table/components/table/table.js | 2 ++ .../components/table/__tests__/__snapshots__/table.test.js.snap | 2 ++ .../scripted_fields_table/components/table/table.js | 2 ++ 4 files changed, 8 insertions(+) diff --git a/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/indexed_fields_table/components/table/__tests__/__snapshots__/table.test.js.snap b/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/indexed_fields_table/components/table/__tests__/__snapshots__/table.test.js.snap index 346de21041c88..ca3e3a088dcb5 100644 --- a/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/indexed_fields_table/components/table/__tests__/__snapshots__/table.test.js.snap +++ b/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/indexed_fields_table/components/table/__tests__/__snapshots__/table.test.js.snap @@ -91,6 +91,7 @@ exports[`Table should render normally 1`] = ` "name": "Name", "render": [Function], "sortable": true, + "width": "38%", }, Object { "dataType": "string", @@ -140,6 +141,7 @@ exports[`Table should render normally 1`] = ` }, ], "name": "", + "width": "40px", }, ] } diff --git a/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/indexed_fields_table/components/table/table.js b/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/indexed_fields_table/components/table/table.js index d24060c2cb10d..2e4bfb62f8481 100644 --- a/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/indexed_fields_table/components/table/table.js +++ b/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/indexed_fields_table/components/table/table.js @@ -75,6 +75,7 @@ export class Table extends PureComponent { render: (value) => { return this.renderFieldName(value, indexPattern.timeFieldName === value); }, + width: '38%', }, { field: 'type', @@ -126,6 +127,7 @@ export class Table extends PureComponent { type: 'icon', }, ], + width: '40px', } ]; diff --git a/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/scripted_fields_table/components/table/__tests__/__snapshots__/table.test.js.snap b/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/scripted_fields_table/components/table/__tests__/__snapshots__/table.test.js.snap index c00a1053302ee..7672556f1ae80 100644 --- a/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/scripted_fields_table/components/table/__tests__/__snapshots__/table.test.js.snap +++ b/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/scripted_fields_table/components/table/__tests__/__snapshots__/table.test.js.snap @@ -10,6 +10,7 @@ exports[`Table should render normally 1`] = ` "field": "displayName", "name": "Name", "sortable": true, + "width": "38%", }, Object { "dataType": "string", @@ -50,6 +51,7 @@ exports[`Table should render normally 1`] = ` }, ], "name": "", + "width": "40px", }, ] } diff --git a/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/scripted_fields_table/components/table/table.js b/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/scripted_fields_table/components/table/table.js index d97a8715a9d36..310ae0b443e11 100644 --- a/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/scripted_fields_table/components/table/table.js +++ b/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/scripted_fields_table/components/table/table.js @@ -38,6 +38,7 @@ export class Table extends PureComponent { description: `Name of the field`, dataType: 'string', sortable: true, + width: '38%', }, { field: 'lang', name: 'Lang', @@ -77,6 +78,7 @@ export class Table extends PureComponent { color: 'danger', onClick: deleteField, }], + width: '40px', }]; const pagination = {