Skip to content

Commit

Permalink
fix: fixed nameField() not passing through expressions and config
Browse files Browse the repository at this point in the history
  • Loading branch information
dereekb committed Nov 22, 2022
1 parent 6def0ee commit b6c9f76
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ export const PHONE_LABEL_MAX_LENGTH = 100;
export const LABEL_STRING_MAX_LENGTH = 100;
export const SEARCH_STRING_MAX_LENGTH = 100;

export function nameField({ key = 'name', label = 'Name', placeholder = 'John Doe', required = false, minLength, maxLength, attributes }: Partial<TextFieldConfig> = {}): FormlyFieldConfig {
export function nameField(config: Partial<TextFieldConfig> = {}): FormlyFieldConfig {
const { key = 'name', label = 'Name', placeholder = 'John Doe', required = false, minLength, maxLength, attributes } = config;

return textField({
...config,
key,
label,
placeholder,
Expand Down

0 comments on commit b6c9f76

Please sign in to comment.