Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
TriggerFormData,
TriggerFormDataErrors,
eventTypeKey,
intentTypeKey,
} from '../../utils/dialogUtil';
import { StoreContext } from '../../store';
import { DialogInfo } from '../../store/types';
Expand Down Expand Up @@ -47,7 +48,7 @@ interface TriggerCreationModalProps {

const initialFormData: TriggerFormData = {
errors: {},
$type: '',
$type: intentTypeKey,
name: '',
constraint: '',
eventType: '',
Expand Down Expand Up @@ -121,6 +122,7 @@ export const TriggerCreationModal: React.FC<TriggerCreationModalProps> = props =
onChange={onSelectTriggerType}
errorMessage={formData.errors.$type}
data-testid={'triggerTypeDropDown'}
defaultSelectedKey={intentTypeKey}
/>

{showEventDropDown && (
Expand Down
5 changes: 1 addition & 4 deletions Composer/packages/client/src/utils/dialogUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export function getDialog(dialogs: DialogInfo[], dialogId: string) {
}

export const eventTypeKey: string = SDKTypes.OnDialogEvent;
export const intentTypeKey: string = SDKTypes.OnIntent;

export function getFriendlyName(data) {
if (get(data, '$designer.name')) {
Expand Down Expand Up @@ -106,10 +107,6 @@ export function deleteTrigger(dialogs: DialogInfo[], dialogId: string, index: nu

export function getTriggerTypes(): IDropdownOption[] {
const triggerTypes: IDropdownOption[] = [
{
key: '',
text: '',
},
...dialogGroups[DialogGroup.EVENTS].types.map(t => {
let name = t as string;
const labelOverrides = ConceptLabels[t];
Expand Down