Represents base class for all tool actions in toolbar

Type Parameters

Hierarchy

Hierarchy

Constructors

Properties

context: any

If using the new style context, re-declare this in your class to be the React.ContextType of your static contextType. Should be used with type annotation or static contextType.

static contextType = MyContext
// For TS pre-3.7:
context!: React.ContextType<typeof MyContext>
// For TS 3.7 and above:
declare context: React.ContextType<typeof MyContext>
props: Readonly<P> & Readonly<{
    children?: ReactNode;
}>
refs: {
    [key: string]: ReactInstance;
}

Type declaration

  • [key: string]: ReactInstance
state: Readonly<{}>
contextType?: Context<any>

If set, this.context will be set at runtime to the current value of the given Context.

Usage:

type MyContext = number
const Ctx = React.createContext<MyContext>(0)

class Foo extends React.Component {
static contextType = Ctx
context!: React.ContextType<typeof Ctx>
render () {
return <>My context's value: {this.context}</>;
}
}

Accessors

  • get actualBackground(): string
  • Gets the actual background used by the tool action.

    Returns string

  • set actualBackground(v): void
  • Parameters

    • v: string

    Returns void

  • get actualDisabledTextColor(): string
  • Gets the actual label text color when the tool is disabled.

    Returns string

  • set actualDisabledTextColor(v): void
  • Parameters

    • v: string

    Returns void

  • get actualHighlightColor(): string
  • Returns string

  • set actualHighlightColor(v): void
  • Parameters

    • v: string

    Returns void

  • get actualHighlightRadius(): number
  • Returns number

  • set actualHighlightRadius(v): void
  • Parameters

    • v: number

    Returns void

  • get actualHighlightWidth(): number
  • Returns number

  • set actualHighlightWidth(v): void
  • Parameters

    • v: number

    Returns void

  • get actualHoverBackground(): string
  • Gets the actual hover background used by the tool action.

    Returns string

  • set actualHoverBackground(v): void
  • Parameters

    • v: string

    Returns void

  • get actualIconFill(): string
  • Gets the actual icon fill color.

    Returns string

  • set actualIconFill(v): void
  • Parameters

    • v: string

    Returns void

  • get actualIconHeight(): number
  • Gets the actual icon height used.

    Returns number

  • set actualIconHeight(v): void
  • Parameters

    • v: number

    Returns void

  • get actualIconStroke(): string
  • Gets the actual icon stroke color.

    Returns string

  • set actualIconStroke(v): void
  • Parameters

    • v: string

    Returns void

  • get actualIconWidth(): number
  • Gets the actual icon width used.

    Returns number

  • set actualIconWidth(v): void
  • Parameters

    • v: number

    Returns void

  • get actualPaddingBottom(): number
  • Returns number

  • set actualPaddingBottom(v): void
  • Parameters

    • v: number

    Returns void

  • get actualPaddingLeft(): number
  • Returns number

  • set actualPaddingLeft(v): void
  • Parameters

    • v: number

    Returns void

  • get actualPaddingRight(): number
  • Returns number

  • set actualPaddingRight(v): void
  • Parameters

    • v: number

    Returns void

  • get actualPaddingTop(): number
  • Returns number

  • set actualPaddingTop(v): void
  • Parameters

    • v: number

    Returns void

  • get actualSubtitleTextColor(): string
  • Gets the actual label text color.

    Returns string

  • set actualSubtitleTextColor(v): void
  • Parameters

    • v: string

    Returns void

  • get actualSubtitleTextStyle(): FontInfo
  • Gets the actual font used.

    Returns FontInfo

  • set actualSubtitleTextStyle(v): void
  • Parameters

    • v: FontInfo

    Returns void

  • get actualTextColor(): string
  • Gets the actual label text color.

    Returns string

  • set actualTextColor(v): void
  • Parameters

    • v: string

    Returns void

  • get actualTextStyle(): FontInfo
  • Gets the actual font used.

    Returns FontInfo

  • set actualTextStyle(v): void
  • Parameters

    • v: FontInfo

    Returns void

  • get afterId(): string
  • Gets or sets the Id of the action that this action will be inserted after. Subsequent actions will continue to insert after the target action, following the original action that set this property. If using this property do not use the BeforeId property. This property is only relevant during initial insertion into the toolbar. Changing the property after the action has already been added will have no effect.

    Returns string

  • set afterId(v): void
  • Parameters

    • v: string

    Returns void

  • get background(): string
  • Gets or sets the background color of the tool action.

    Returns string

  • set background(v): void
  • Parameters

    • v: string

    Returns void

  • get beforeId(): string
  • Gets or sets the Id of the action that this action will be inserted before. Subsequent actions will continue to insert before the target action, following the original action that set this property. If using this property do not use the AfterId property. This property is only relevant during initial insertion into the toolbar. Changing the property after the action has already been added will have no effect.

    Returns string

  • set beforeId(v): void
  • Parameters

    • v: string

    Returns void

  • get closeOnExecute(): boolean
  • Gets or sets if the tool action will close its parent dropdown when executed by the user.

    Returns boolean

  • set closeOnExecute(v): void
  • Parameters

    • v: boolean

    Returns void

  • get commandArgument(): string
  • Returns string

  • set commandArgument(v): void
  • Parameters

    • v: string

    Returns void

  • get commandArgumentValue(): any
  • Returns any

  • set commandArgumentValue(v): void
  • Parameters

    • v: any

    Returns void

  • get commandId(): string
  • Returns string

  • set commandId(v): void
  • Parameters

    • v: string

    Returns void

  • get disabledTextColor(): string
  • Gets or sets the label text color when the tool is disabled.

    Returns string

  • set disabledTextColor(v): void
  • Parameters

    • v: string

    Returns void

  • get highlightColor(): string
  • Returns string

  • set highlightColor(v): void
  • Parameters

    • v: string

    Returns void

  • get highlightRadius(): number
  • Returns number

  • set highlightRadius(v): void
  • Parameters

    • v: number

    Returns void

  • get highlightWidth(): number
  • Returns number

  • set highlightWidth(v): void
  • Parameters

    • v: number

    Returns void

  • get hoverBackground(): string
  • Gets or sets the hover background for this tool action.

    Returns string

  • set hoverBackground(v): void
  • Parameters

    • v: string

    Returns void

  • get iconCollectionName(): string
  • Returns string

  • set iconCollectionName(v): void
  • Parameters

    • v: string

    Returns void

  • get iconFill(): string
  • Gets or sets the icon fill color.

    Returns string

  • set iconFill(v): void
  • Parameters

    • v: string

    Returns void

  • get iconFillColors(): string[]
  • Gets or sets the icon fill colors.

    Returns string[]

  • set iconFillColors(v): void
  • Parameters

    • v: string[]

    Returns void

  • get iconHeight(): number
  • Gets or sets the height of the icon.

    Returns number

  • set iconHeight(v): void
  • Parameters

    • v: number

    Returns void

  • get iconName(): string
  • Returns string

  • set iconName(v): void
  • Parameters

    • v: string

    Returns void

  • get iconStroke(): string
  • Gets or sets the icon stroke color.

    Returns string

  • set iconStroke(v): void
  • Parameters

    • v: string

    Returns void

  • get iconStrokeColors(): string[]
  • Gets or sets the icon stroke colors.

    Returns string[]

  • set iconStrokeColors(v): void
  • Parameters

    • v: string[]

    Returns void

  • get iconStrokeWidth(): number
  • Gets or sets the icon viewbox width.

    Returns number

  • set iconStrokeWidth(v): void
  • Parameters

    • v: number

    Returns void

  • get iconViewBoxHeight(): number
  • Gets or sets the icon viewbox height.

    Returns number

  • set iconViewBoxHeight(v): void
  • Parameters

    • v: number

    Returns void

  • get iconViewBoxLeft(): number
  • Gets or sets the icon viewbox left.

    Returns number

  • set iconViewBoxLeft(v): void
  • Parameters

    • v: number

    Returns void

  • get iconViewBoxTop(): number
  • Gets or sets the icon viewbox top.

    Returns number

  • set iconViewBoxTop(v): void
  • Parameters

    • v: number

    Returns void

  • get iconViewBoxWidth(): number
  • Gets or sets the icon viewbox width.

    Returns number

  • set iconViewBoxWidth(v): void
  • Parameters

    • v: number

    Returns void

  • get iconWidth(): number
  • Gets or sets the width of the icon.

    Returns number

  • set iconWidth(v): void
  • Parameters

    • v: number

    Returns void

  • get id(): string
  • Returns string

  • get isDisabled(): boolean
  • Returns boolean

  • set isDisabled(v): void
  • Parameters

    • v: boolean

    Returns void

  • get isHighlighted(): boolean
  • Returns boolean

  • set isHighlighted(v): void
  • Parameters

    • v: boolean

    Returns void

  • get name(): string
  • Returns string

  • set name(v): void
  • Parameters

    • v: string

    Returns void

  • get nativeElement(): HTMLElement
  • Returns HTMLElement

  • get overlayId(): string
  • Sets to the Id of the action that this action will overlay itself on to. The purpose of this property is to allow users to override actions automatically generated by toolbar targets such as the DataChart. These generated actions all have unique Ids associated with them that can be used for the OverlayId. These overlaid actions will not replace the generated one but will have its properties overlaid onto the generated actions.

    Returns string

  • set overlayId(v): void
  • Parameters

    • v: string

    Returns void

  • get paddingBottom(): number
  • Returns number

  • set paddingBottom(v): void
  • Parameters

    • v: number

    Returns void

  • get paddingLeft(): number
  • Returns number

  • set paddingLeft(v): void
  • Parameters

    • v: number

    Returns void

  • get paddingRight(): number
  • Returns number

  • set paddingRight(v): void
  • Parameters

    • v: number

    Returns void

  • get paddingTop(): number
  • Returns number

  • set paddingTop(v): void
  • Parameters

    • v: number

    Returns void

  • get parentId(): string
  • Returns string

  • set parentId(v): void
  • Parameters

    • v: string

    Returns void

  • get subtitle(): string
  • Gets or sets the subtitle of the tool.

    Returns string

  • set subtitle(v): void
  • Parameters

    • v: string

    Returns void

  • get subtitleTextColor(): string
  • Gets or sets the label text color.

    Returns string

  • set subtitleTextColor(v): void
  • Parameters

    • v: string

    Returns void

  • get subtitleTextStyle(): string
  • Gets or sets the font to use.

    Returns string

  • set subtitleTextStyle(v): void
  • Parameters

    • v: string

    Returns void

  • get textColor(): string
  • Gets or sets the label text color.

    Returns string

  • set textColor(v): void
  • Parameters

    • v: string

    Returns void

  • get textStyle(): string
  • Gets or sets the font to use.

    Returns string

  • set textStyle(v): void
  • Parameters

    • v: string

    Returns void

  • get title(): string
  • Gets or sets the title of the tool.

    Returns string

  • set title(v): void
  • Parameters

    • v: string

    Returns void

  • get visibility(): Visibility
  • Gets or sets the tool action visibility.

    Returns Visibility

  • set visibility(v): void
  • Parameters

    • v: Visibility

    Returns void

  • get width(): number
  • Gets or sets the width to use for this tool action.

    Returns number

  • set width(v): void
  • Parameters

    • v: number

    Returns void

Methods

  • Returns void

  • Returns void

  • Catches exceptions generated in descendant components. Unhandled exceptions will cause the entire component tree to unmount.

    Parameters

    • error: Error
    • errorInfo: ErrorInfo

    Returns void

  • Returns void

  • Called immediately after updating occurs. Not called for the initial render.

    The snapshot is only present if getSnapshotBeforeUpdate is present and returns non-null.

    Parameters

    • prevProps: Readonly<P>
    • prevState: Readonly<{}>
    • Optional snapshot: any

    Returns void

  • Called immediately before a component is destroyed. Perform any necessary cleanup in this method, such as cancelled network requests, or cleaning up any DOM elements created in componentDidMount.

    Returns void

  • Returns string

  • Returns any

  • Parameters

    • name: string

    Returns any

  • Parameters

    • Optional callback: (() => void)
        • (): void
        • Returns void

    Returns void

  • Runs before React applies the result of render to the document, and returns an object to be given to componentDidUpdate. Useful for saving things such as scroll position before render causes changes to it.

    Note: the presence of getSnapshotBeforeUpdate prevents any of the deprecated lifecycle events from running.

    Parameters

    • prevProps: Readonly<P>
    • prevState: Readonly<{}>

    Returns any

  • Returns void

  • Returns any

  • Type parameters

    Type Parameters

    • K extends never

    Parameters

    • state: {} | ((prevState, props) => {} | Pick<{}, K>) | Pick<{}, K>
    • Optional callback: (() => void)
        • (): void
        • Returns void

    Returns void

  • Parameters

    • nextProps: any
    • nextState: any

    Returns boolean