We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 283c407 commit 792f734Copy full SHA for 792f734
1 file changed
frontend/components/template-select/template-select.tsx
@@ -45,13 +45,13 @@ export const DefaultTemplateSelect = ({
45
return (
46
<TemplateRadioGroup
47
templates={templates.map((t) => ({
48
- id: `DEFAULT${t.name}`,
+ id: `DEFAULT::${t.name}`, // Prefix to stop name clashes between default and user templates
49
name: t.name,
50
description: t.description,
51
}))}
52
onChange={(id) => {
53
const selectedTemplate = templates.find(
54
- (t) => t.name === id.replace('DEFAULT', '')
+ (t) => `DEFAULT::${t.name}` === id
55
)
56
if (selectedTemplate) {
57
onChange({
@@ -61,7 +61,7 @@ export const DefaultTemplateSelect = ({
61
})
62
}
63
}}
64
- value={value.name}
+ value={`DEFAULT::${value.name}`}
65
isLoading={isLoadingTemplates}
66
/>
67
0 commit comments