EkoDecisionButton is an abstract class for a button part of a decision.
This button extends EkoButton and adds some additional decision specific functionality.

Use this button class if you are overriding an Eko Studio button which is part of a decision and you want to keep it’s
decision behavior (for example, will not be clickable anymore after selection was made).

See: EkoButton

// Creating a component that extends EkoDecisionButton:

import EkoUIComponents from 'EkoUIComponents';

export default class MyDecisionButton extends EkoUIComponents.EkoDecisionButton {
    clickHandler() {
        if (this.getDecisionNodeId() === 'some_special_node_id') {
             alert('button clicked');


ekoUIComponents.EkoDecisionButton.getClassNames() ⇒ string

Behaves like the super class of EkoButton, in addition adds the following classes:
‘selected’ - whether this button was selected in the decision.
‘disabled’ - whether this button should be uninteractable for the user (pointer-events:none).

ekoUIComponents.EkoDecisionButton.getDecisionNodeId() ⇒ string

Convenience method for getting the node ID configured for this component.
If no such handler is defined this function returns null.

Returns: string - Node ID or null

Rate this page: X
Tell us more!