ControlButtonRun

React component. Executes a logical macro (see run)

Example

../../_images/controlbuttonrun.png
import { ControlButtonRun } from "@eva-ics/webengine-react";
import { ActionResult, EvaError } from "@eva-ics/webengine";

const on_success = (result: ActionResult) => {
  console.log(`action success: {result.uuid}`);
};

const on_fail = (err: EvaError) => {
  console.log(`action failed: {error.message}`);
};

const MyBlock = () => {
  return (
    <>
      <ControlButtonRun
        oid="lmacro:tests/open_all"
        label="Open"
        on_success={on_success}
        on_fail={on_fail}
      />
    </>
  );
};

Parameters

name

type

required

description

oid

string

yes

Lmacro OID

params

object

no

additional call parameters (lmacro arguments)

label

string

no

Button label

busy

string

no

Item OID to get busy status from

css_class

string

no

custom button css class

on_success

(result: ActionResult) => void

no

called on action success

on_fail

(err: EvaError) => void

no

called on action fail

engine

Eva

no

WebEngine object (if no default set)

CSS classes

name

description

div.eva.button.container.run.CSS_CLASS

primary button container

button.eva.button.run.CSS_CLASS

run button