### File

`src/question/textarea.model.ts`

### Extends

`Question`

### Index

###### Properties
Public placeholder
###### Methods
Public fromJson

### Constructor

`constructor(name: string, description: string, dependencies: Dependency[], answer: Answer | string, validations: Validation[], disabled: boolean, placeholder: string)`
Defined in src/question/textarea.model.ts:17
Parameters :
Name | Type | Optional | Description
name | `string` |  |
description | `string` |  |
dependencies | `Dependency[]` |  |
answer | `Answer | string` |  |
validations | `Validation[]` |  |
disabled | `boolean` |  |
placeholder | `string` |  |

### Methods

Public fromJson
`fromJson(question: TextArea)`
Defined in src/question/textarea.model.ts:7
Parameters :
Name | Type | Optional | Description
question | `TextArea` |  |
Returns : `TextArea`

### Properties

Public placeholder
`placeholder: `string``
Type : `string`
Defined in src/question/textarea.model.ts:26

    import { Answer, Dependency, Question, QuestionType } from '.';
    import { Validation } from '../validation';
    import { AnswerFactory, ValidationFactory } from '../factory';

    export class TextArea extends Question<string> {

      public static fromJson(question: TextArea): TextArea {
        return new TextArea(
          question.name,
          question.description,
          question.dependencies,
          AnswerFactory.create<string>(question.answer),
          ValidationFactory.createValidationList(question.validations),
          question.disabled,
          question.placeholder
        );
      }

      public constructor(
        name: string,
        description: string,
        dependencies: Dependency[] = [],
        answer: Answer<string> | string = null,
        validations: Validation[] = [],
        disabled: boolean = false,
        public placeholder: string = null,
      ) {
        super(name, description, QuestionType.TEXTAREA, dependencies, answer, validations, disabled);
      }
    }

# results matching ""

# No results matching ""