mirror of
https://github.com/grafana/grafana.git
synced 2024-12-22 15:13:38 -06:00
PanelChrome: Adds "onDragStart" prop (#97495)
This commit is contained in:
parent
dd9638cade
commit
aeed123312
@ -34,6 +34,7 @@ interface BaseProps {
|
|||||||
menu?: ReactElement | (() => ReactElement);
|
menu?: ReactElement | (() => ReactElement);
|
||||||
dragClass?: string;
|
dragClass?: string;
|
||||||
dragClassCancel?: string;
|
dragClassCancel?: string;
|
||||||
|
onDragStart?: (e: React.PointerEvent) => void;
|
||||||
selectionId?: string;
|
selectionId?: string;
|
||||||
/**
|
/**
|
||||||
* Use only to indicate loading or streaming data in the panel.
|
* Use only to indicate loading or streaming data in the panel.
|
||||||
@ -142,6 +143,7 @@ export function PanelChrome({
|
|||||||
onFocus,
|
onFocus,
|
||||||
onMouseMove,
|
onMouseMove,
|
||||||
onMouseEnter,
|
onMouseEnter,
|
||||||
|
onDragStart,
|
||||||
showMenuAlways = false,
|
showMenuAlways = false,
|
||||||
}: PanelChromeProps) {
|
}: PanelChromeProps) {
|
||||||
const theme = useTheme2();
|
const theme = useTheme2();
|
||||||
@ -312,6 +314,7 @@ export function PanelChrome({
|
|||||||
className={cx(styles.headerContainer, dragClass)}
|
className={cx(styles.headerContainer, dragClass)}
|
||||||
style={headerStyles}
|
style={headerStyles}
|
||||||
data-testid="header-container"
|
data-testid="header-container"
|
||||||
|
onPointerDown={onDragStart}
|
||||||
onPointerUp={onSelect}
|
onPointerUp={onSelect}
|
||||||
>
|
>
|
||||||
{statusMessage && (
|
{statusMessage && (
|
||||||
|
@ -26,15 +26,15 @@ composableKinds: PanelCfg: {
|
|||||||
version: [0, 0]
|
version: [0, 0]
|
||||||
schema: {
|
schema: {
|
||||||
Options: {
|
Options: {
|
||||||
showLabels: bool
|
showLabels: bool
|
||||||
showCommonLabels: bool
|
showCommonLabels: bool
|
||||||
showTime: bool
|
showTime: bool
|
||||||
showLogContextToggle: bool
|
showLogContextToggle: bool
|
||||||
wrapLogMessage: bool
|
wrapLogMessage: bool
|
||||||
prettifyLogMessage: bool
|
prettifyLogMessage: bool
|
||||||
enableLogDetails: bool
|
enableLogDetails: bool
|
||||||
sortOrder: common.LogsSortOrder
|
sortOrder: common.LogsSortOrder
|
||||||
dedupStrategy: common.LogsDedupStrategy
|
dedupStrategy: common.LogsDedupStrategy
|
||||||
enableInfiniteScrolling?: bool
|
enableInfiniteScrolling?: bool
|
||||||
// TODO: figure out how to define callbacks
|
// TODO: figure out how to define callbacks
|
||||||
onClickFilterLabel?: _
|
onClickFilterLabel?: _
|
||||||
|
Loading…
Reference in New Issue
Block a user