Skip to content

Commit

Permalink
[DataGrid] Set default logLevel to warn (#117)
Browse files Browse the repository at this point in the history
* override default logLevel to warn

* rerun CI

Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
  • Loading branch information
dtassone and oliviertassinari committed Jul 28, 2020
1 parent 1865ee2 commit 8606ef3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/grid/x-grid-modules/src/gridComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import { mergeOptions } from './utils/mergeOptions';
*/
export const GridComponent: React.FC<GridComponentProps> = React.memo(
({ rows, columns, options, apiRef, loading, licenseStatus, className, components }) => {
useLoggerFactory(options?.logger, options?.logLevel);
useLoggerFactory(options?.logger, options?.logLevel || DEFAULT_GRID_OPTIONS.logLevel);
const logger = useLogger('Grid');
const rootContainerRef: RootContainerRef = React.useRef<HTMLDivElement>(null);
const footerRef = React.useRef<HTMLDivElement>(null);
Expand Down
1 change: 1 addition & 0 deletions packages/grid/x-grid-modules/src/models/gridOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ export const DEFAULT_GRID_OPTIONS: GridOptions = {
paginationMode: FeatureMode.client,
extendRowFullWidth: true,
sortingOrder: ['asc', 'desc', null],
logLevel: 'warn',
columnTypes: DEFAULT_COLUMN_TYPES,
icons: {
columnSortedAscending: () => <ArrowUpward className="icon" />,
Expand Down

0 comments on commit 8606ef3

Please sign in to comment.