mirror of
https://github.com/getredash/redash.git
synced 2025-12-19 17:37:19 -05:00
- Added possibility to select visible columns and reordering - Added formatting options as in Table visualization - Set default alignment to left
32 lines
675 B
TypeScript
32 lines
675 B
TypeScript
import React from "react";
|
|
import SharedColumnEditor from "../../shared/components/ColumnEditor";
|
|
|
|
type OwnProps = {
|
|
column: {
|
|
name: string;
|
|
title?: string;
|
|
visible?: boolean;
|
|
alignContent?: "left" | "center" | "right";
|
|
displayAs?: any;
|
|
description?: string;
|
|
};
|
|
onChange?: (...args: any[]) => any;
|
|
};
|
|
|
|
type Props = OwnProps & typeof ColumnEditor.defaultProps;
|
|
|
|
export default function ColumnEditor({ column, onChange }: Props) {
|
|
return (
|
|
<SharedColumnEditor
|
|
column={column}
|
|
onChange={onChange}
|
|
variant="details"
|
|
showSearch={false}
|
|
/>
|
|
);
|
|
}
|
|
|
|
ColumnEditor.defaultProps = {
|
|
onChange: (...args: any[]) => {},
|
|
};
|