Skip to content

providing default values to components #353

@prashantchavan85

Description

@prashantchavan85

Describe the bug
which template:

  • MaterialDesignFrameworkModule — Material Design
  • Bootstrap3FrameworkModule — Bootstrap 3
  • Bootstrap4FrameworkModule — Bootstrap 4
  • NoFrameworkModule — plain HTML
  • Other (please specify below)

Is there any way we can have default values for components in layout or schema ? e.g. checkboxes value can be true or false, date components can have default value to todays date etc.

We are trying to avoid the setting default values on each component OnInit, it is causing too many updates to formGroup valuechanges subscription callback method.

To Reproduce
Steps to reproduce the behavior:

  1. looking for demo which sets default values.

Expected behavior
Provide some default values to form controls on page load instead of setting it on the each component oninit.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Log output covering before error and any error statements

Insert log hereCopy

Additional context
Add any other context about the problem here.

Detailed Description

Context

Possible Implementation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions