in viz-lib/src/visualizations/table/columns/image.tsx [18:95]
function Editor({ column, onChange }: Props) {
const [onChangeDebounced] = useDebouncedCallback(onChange, 200);
return (
<React.Fragment>
{/* @ts-expect-error ts-migrate(2745) FIXME: This JSX tag's 'children' prop expects type 'never... Remove this comment to see the full error message */}
<Section>
<Input
label="URL template"
data-test="Table.ColumnEditor.Image.UrlTemplate"
defaultValue={column.imageUrlTemplate}
onChange={(event: any) => onChangeDebounced({ imageUrlTemplate: event.target.value })}
/>
</Section>
{/* @ts-expect-error ts-migrate(2745) FIXME: This JSX tag's 'children' prop expects type 'never... Remove this comment to see the full error message */}
<Section>
<ControlLabel
// @ts-expect-error ts-migrate(2322) FIXME: Type 'Element' is not assignable to type 'null | u... Remove this comment to see the full error message
label={
<React.Fragment>
Size
{/* @ts-expect-error ts-migrate(2746) FIXME: This JSX tag's 'children' prop expects a single ch... Remove this comment to see the full error message */}
<ContextHelp placement="topLeft" arrowPointAtCenter>
<div style={{ marginBottom: 5 }}>Any positive integer value that specifies size in pixels.</div>
<div>Leave empty to use default value.</div>
</ContextHelp>
</React.Fragment>
}>
{/* @ts-expect-error ts-migrate(2322) FIXME: Type 'Element' is not assignable to type 'null | u... Remove this comment to see the full error message */}
<div className="image-dimension-selector">
<Input
data-test="Table.ColumnEditor.Image.Width"
placeholder="Width"
defaultValue={column.imageWidth}
onChange={(event: any) => onChangeDebounced({ imageWidth: event.target.value })}
/>
<span className="image-dimension-selector-spacer">×</span>
<Input
data-test="Table.ColumnEditor.Image.Height"
placeholder="Height"
defaultValue={column.imageHeight}
onChange={(event: any) => onChangeDebounced({ imageHeight: event.target.value })}
/>
</div>
</ControlLabel>
</Section>
{/* @ts-expect-error ts-migrate(2745) FIXME: This JSX tag's 'children' prop expects type 'never... Remove this comment to see the full error message */}
<Section>
<Input
label="Title template"
data-test="Table.ColumnEditor.Image.TitleTemplate"
defaultValue={column.imageTitleTemplate}
onChange={(event: any) => onChangeDebounced({ imageTitleTemplate: event.target.value })}
/>
</Section>
{/* @ts-expect-error ts-migrate(2745) FIXME: This JSX tag's 'children' prop expects type 'never... Remove this comment to see the full error message */}
<Section>
{/* @ts-expect-error ts-migrate(2746) FIXME: This JSX tag's 'children' prop expects a single ch... Remove this comment to see the full error message */}
<ContextHelp
placement="topLeft"
arrowPointAtCenter
// @ts-expect-error ts-migrate(2322) FIXME: Type 'Element' is not assignable to type 'null | u... Remove this comment to see the full error message
icon={<span style={{ cursor: "default" }}>Format specs {ContextHelp.defaultIcon}</span>}>
<div>
All columns can be referenced using <code>{"{{ column_name }}"}</code> syntax.
</div>
<div>
Use <code>{"{{ @ }}"}</code> to reference current (this) column.
</div>
<div>This syntax is applicable to URL, Title and Size options.</div>
</ContextHelp>
</Section>
</React.Fragment>
);
}