AutomationNumberInput
- Reference
- 2-min read
The AutomationNumberInput component allows you to provide a numeric value. Additionally, you can switch from select mode to expression mode, which displays an AutomationTextInput, for a dynamic expression.
Import
import { AutomationNumberInput } from '@dynatrace/automation-action-components';
Props
The props are the same as for the Strato NumberInput component except for the value prop, which also supports expressions.
Example.tsx
import { useState } from 'react';
import { AutomationNumberInput } from '@dynatrace/automation-action-components';
export const Example = () => {
const [value, setValue] = useState<number | null | string>('{{ result("task_1")["value_1"] }}');
return <AutomationNumberInput value={value} onChange={(value) => setValue(value)} />;
};