Skip to content

Commit

Permalink
Move default column to constants.ts , increase a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
kertal committed Aug 16, 2021
1 parent dceeb04 commit 38b2f53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const gridStyle = {

export const pageSizeArr = [25, 50, 100, 250];
export const defaultPageSize = 100;
export const defaultTimeColumnWidth = 190;
export const toolbarVisibility = {
showColumnSelector: {
allowHide: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ import { i18n } from '@kbn/i18n';
import { EuiDataGridColumn, EuiScreenReaderOnly } from '@elastic/eui';
import { ExpandButton } from './discover_grid_expand_button';
import { DiscoverGridSettings } from './types';
import { IndexPattern } from '../../../../../data/common/index_patterns/index_patterns';
import type { IndexPattern } from '../../../../../data/common';
import { buildCellActions } from './discover_grid_cell_actions';
import { getSchemaByKbnType } from './discover_grid_schema';
import { SelectButton } from './discover_grid_document_selection';
import { defaultTimeColumnWidth } from './constants';

export function getLeadControlColumns() {
return [
Expand Down Expand Up @@ -88,7 +89,7 @@ export function buildEuiGridColumn(

if (column.id === indexPattern.timeFieldName) {
column.display = `${timeString} (${indexPattern.timeFieldName})`;
column.initialWidth = 180;
column.initialWidth = defaultTimeColumnWidth;
}
if (columnWidth > 0) {
column.initialWidth = Number(columnWidth);
Expand Down

0 comments on commit 38b2f53

Please sign in to comment.