mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 08:58:26 +00:00
Feature: Support for dynamic variables in alerts (#255)
This commit is contained in:
parent
2329311416
commit
eefb140ed2
2 changed files with 6 additions and 7 deletions
|
|
@ -93,13 +93,11 @@ export const EventSelector = ({
|
|||
{definition.actionId === 'show-alert' && (
|
||||
<div className="p-1">
|
||||
<label className="form-label mt-1">Message</label>
|
||||
<input
|
||||
onBlur={(e) => eventOptionUpdated(param, 'message', e.target.value, extraData)}
|
||||
value={message}
|
||||
type="text"
|
||||
className="form-control form-control-sm"
|
||||
placeholder="Text goes here"
|
||||
<CodeHinter
|
||||
currentState={currentState}
|
||||
onChange={(value) => eventOptionUpdated(param, 'message', value, extraData)}
|
||||
/>
|
||||
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,8 @@ async function copyToClipboard(text) {
|
|||
function executeAction(_ref, event) {
|
||||
if (event) {
|
||||
if (event.actionId === 'show-alert') {
|
||||
toast(event.options.message, { hideProgressBar: true });
|
||||
const message = resolveReferences(event.options.message, _ref.state.currentState);
|
||||
toast(message, { hideProgressBar: true });
|
||||
}
|
||||
|
||||
if (event.actionId === 'open-webpage') {
|
||||
|
|
|
|||
Loading…
Reference in a new issue