import React, { useCallback } from "react"; import { Button, ButtonGroup, Tooltip, Icon } from "@blueprintjs/core"; import { IconNames } from "@blueprintjs/icons"; import * as globals from "../../globals"; const HistogramHeader = React.memo( ({ // @ts-expect-error ts-migrate(2339) FIXME: Property 'fieldId' does not exist on type '{ child... Remove this comment to see the full error message fieldId, // @ts-expect-error ts-migrate(2339) FIXME: Property 'isColorBy' does not exist on type '{ chi... Remove this comment to see the full error message isColorBy, // @ts-expect-error ts-migrate(2339) FIXME: Property 'onColorByClick' does not exist on type '... Remove this comment to see the full error message onColorByClick, // @ts-expect-error ts-migrate(2339) FIXME: Property 'onRemoveClick' does not exist on type '{... Remove this comment to see the full error message onRemoveClick, // @ts-expect-error ts-migrate(2339) FIXME: Property 'isScatterPlotX' does not exist on type '... Remove this comment to see the full error message isScatterPlotX, // @ts-expect-error ts-migrate(2339) FIXME: Property 'isScatterPlotY' does not exist on type '... Remove this comment to see the full error message isScatterPlotY, // @ts-expect-error ts-migrate(2339) FIXME: Property 'onScatterPlotXClick' does not exist on t... Remove this comment to see the full error message onScatterPlotXClick, // @ts-expect-error ts-migrate(2339) FIXME: Property 'onScatterPlotYClick' does not exist on t... Remove this comment to see the full error message onScatterPlotYClick, // @ts-expect-error ts-migrate(2339) FIXME: Property 'isObs' does not exist on type '{ childre... Remove this comment to see the full error message isObs, }) => { /* Render the toolbar for the histogram. Props: * fieldId - field identifier, used for various IDs * isColorBy - true/false, is this the current color-by * onColorByClick - color-by click handler * onRemoveClick - optional handler for remove. Button will not render if not defined. * isScatterPlotX - optional, true/false if currently the X scatterplot field * isScatterPlotY - optional, true/false if currently the Y scatterplot field * onScatterPlotXClick - optional, handler for scatterPlot X button. * onScatterPlotYClick - optional, handler for scatterPlot X button. Scatterplot controls will not render if either handler unspecified. */ const memoizedColorByCallback = useCallback( () => onColorByClick(fieldId, isObs), [fieldId, isObs] ); return (
{onScatterPlotXClick && onScatterPlotYClick ? ( ) : null} {onRemoveClick ? ( ) : null}
); } ); export default HistogramHeader;