Skip to content

Commit

Permalink
console: fix "Cannot read property 'foldable'" runtime error in `Brow…
Browse files Browse the repository at this point in the history
…se Rows` page (fix #4907) (#5016)
  • Loading branch information
Aleksandra Sikora committed Jun 8, 2020
1 parent a233067 commit e800e32
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ Read more about the session argument for computed fields in the [docs](https://h
- console: fix visiting view modify page overwriting raw sql content (fix #4798) (#4810)
- console: add help button and move about page to settings (#4848)
- console: add new sidebar icon that separates enums from tables (fix #4984) (#4992)
- console: fix "Cannot read property 'foldable'" runtime error in `Browse Rows` page (fix #4907) (#5016)
- cli: list all available commands in root command help (fix #4623) (#4628)
- cli: fix bug with squashing event triggers (close #4883)
- cli: add support for skipping execution while generating migrations through the migrate REST API
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export default ReactTable => {
};

applyFoldableForColumns = columns => {
return columns.map((col, index) => {
return columns.filter(Boolean).map((col, index) => {
if (!col.foldable) return col;

//If col don't have id then generate id based on index
Expand Down
12 changes: 9 additions & 3 deletions console/src/components/Common/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@ import React from 'react';
import OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger';
import Tooltip from 'react-bootstrap/lib/Tooltip';
import styles from './Tooltip.scss';

const tooltipGen = (message: string) => {
return <Tooltip id={message}>{message}</Tooltip>;
};export interface TooltipProps extends React.ComponentProps<'i'> {
};
export interface TooltipProps extends React.ComponentProps<'i'> {
message: string;
placement?: 'right' | 'left' | 'top' | 'bottom';
className?: string;
}
const ToolTip: React.FC<TooltipProps> = ({ message, placement = 'right', children }) => (
const ToolTip: React.FC<TooltipProps> = ({
message,
placement = 'right',
children,
}) => (
<OverlayTrigger placement={placement} overlay={tooltipGen(message)}>
{children || (
<i
Expand All @@ -19,4 +25,4 @@ const ToolTip: React.FC<TooltipProps> = ({ message, placement = 'right', childre
)}
</OverlayTrigger>
);
export default ToolTip;
export default ToolTip;

0 comments on commit e800e32

Please sign in to comment.