Skip to content

Commit

Permalink
small tweaks...
Browse files Browse the repository at this point in the history
  • Loading branch information
rusackas committed Oct 2, 2022
1 parent 8d603dd commit 9853ffc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const TooltipSection = ({
);

export const isLabelTruncated = (labelRef?: React.RefObject<any>): boolean =>
!!(labelRef?.current?.scrollWidth > labelRef?.current.clientWidth);
!!(labelRef?.current?.scrollWidth > labelRef?.current?.clientWidth);

export const getColumnLabelText = (column: ColumnMeta): string =>
column.verbose_name || column.column_name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ export default class CRUDCollection extends React.PureComponent<
}

renderCell(record: any, col: any) {
const renderer = this?.props?.itemRenderers?.[col];
const renderer = this.props.itemRenderers?.[col];
const val = record[col];
const onChange = this.onCellChange.bind(this, record.id, col);
return renderer ? renderer(val, onChange, this.getLabel(col), record) : val;
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/preamble.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if (typeof window !== 'undefined') {
bootstrapData = root
? JSON.parse(root.getAttribute('data-bootstrap') || '{}')
: {};
if (bootstrapData?.common.language_pack) {
if (bootstrapData?.common?.language_pack) {
const languagePack = bootstrapData.common.language_pack;
configure({ languagePack });
moment.locale(bootstrapData.common.locale);
Expand Down

0 comments on commit 9853ffc

Please sign in to comment.