Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface SegmentedButtonOptions

A data type that represents the configuration options for a segmented button component.

Hierarchy

Index

Properties

Optional className

className: string

CSS class name to add to the view's element.

Optional closeIcon

closeIcon: boolean

A Boolean indicating whether a close icon should appear on hover when selected.

Optional controls

controls: {}

Optional configuration for additional controls rendered with the button, such as a close indicator on hover, settings popover, etc.

Type declaration

  • [key: string]: any

Optional filter

filter: boolean

A Boolean indicating whether the segments should function as filters to the primary button. This value affects which events are triggered when a segment is selected as filters should be handled differently than changing values.

Optional group

group: string

Optional groupMultiselect

groupMultiselect: boolean

A Boolean indicating whether one or more values from multiple segment groups can be selected, only when filter is true. Default value is true.

Optional id

id: string

Identifier for the button. If not provided, the value will be used as the button's identifier.

Optional loader

loader: boolean

Optional multiselect

multiselect: boolean

A Boolean indicating whether multiple segments can be selected, only when filter is true. Default value is false.

Optional onChange

onChange: (button: SegmentedButton) => void

A custom handler function that is called when a segment button's selected value changes.

Type declaration

Optional onDeselect

onDeselect: (button: AnyButton) => void

A custom handler function that is called when the button is deselected.

Type declaration

Optional onDeselectSegment

onDeselectSegment: (segment: ButtonSegment) => void

A custom handler function that is called when a segment is deselected.

Type declaration

Optional onSelect

onSelect: (button: AnyButton) => void

A custom handler function that is called when the button is selected.

Type declaration

Optional onSelectSegment

onSelectSegment: (segment: ButtonSegment) => void

A custom handler function that is called when a segment is selected.

Type declaration

Optional options

options: {}

Optional data associated with the button.

Type declaration

  • [key: string]: any

Optional parent

parent: string

Optional reloadOnChange

reloadOnChange: boolean

Optional renderer

renderer: Function | string

Renderer for the view, which can either be an HTML string or a function that receives the view's data, if any, and returns the final HTML string to render as the view's content.

Optional requiresData

requiresData: boolean

A Boolean value that indicates whether the view requires valid data to be provided in order for it to be rendered. When this value is true and there is no data provided, then the view will be rendered as empty.

Default value is false.

segments

segments: ButtonSegmentType[] | { groups: ButtonSegmentGroupType[] }

An array of button segment or segment group configurations to render for the button's segments.

Optional selected

selected: boolean

A Boolean indicating whether the button should be selected.

title

title: string

Button label.

Optional toggleable

toggleable: boolean

Optional type

Optional ui

ui: {}

An object that defines the CSS selectors for various UI elements in the view and their reference keys. When a view has been rendered and added to the DOM, you can reference and access these UI targets using this.ui.#key#, where #key# is the key used with this object.

Type declaration

  • [key: string]: string

Optional value

value: any

Button value.

Generated using TypeDoc