Skip to content

Commit ceb9659

Browse files
authored
feat: add option to configure create option label (#1356)
1 parent ef2ab88 commit ceb9659

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

projects/components/src/combo-box/combo-box.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ export class ComboBoxComponent<TValue = string> implements AfterViewInit, OnChan
147147
@Input()
148148
public provideCreateOption: boolean = false;
149149

150+
@Input()
151+
public createOptionLabel?: string = 'Create';
152+
150153
@Input()
151154
public text?: string = '';
152155

@@ -215,7 +218,7 @@ export class ComboBoxComponent<TValue = string> implements AfterViewInit, OnChan
215218

216219
private buildCreateOption(text: string): ComboBoxOption<TValue> {
217220
return {
218-
text: `Create "${text}"`,
221+
text: `${this.createOptionLabel} "${text}"`,
219222
tooltip: text,
220223
icon: IconType.AddCircleOutline
221224
};

0 commit comments

Comments
 (0)