Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

headerCellTemplate in Update dialog #66

Open
hghew opened this issue Jan 10, 2020 · 1 comment
Open

headerCellTemplate in Update dialog #66

hghew opened this issue Jan 10, 2020 · 1 comment

Comments

@hghew
Copy link

hghew commented Jan 10, 2020

Is it possible to add headerCellTemplate to Update dialog as the attached image?
The crud table header column with headerCellTemplate have (Details), can it include inside Update dialog?

Annotation 2020-01-10 151637

@mazdik
Copy link
Owner

mazdik commented Jan 11, 2020

column.formTemplate

  <ng-template #formTemplate let-dynElement="column" let-value="value">
    <div class="dt-group">
      <label [attr.for]="dynElement.name">{{dynElement.title}}</label>
      <input type="text"
             class="dt-input"
             placeholder="{{dynElement.title}}"
             id="{{dynElement.name}}"
             [value]="value || null"
             (input)="onFormValueChange(dynElement, $event.target.value)"
             [disabled]="dynElement.disableOnEdit"/>
    </div>
  </ng-template>
@ViewChild('formTemplate', {static: true}) formTemplate: TemplateRef<any>;

  ngOnInit() {
    const column = this.dataManager.columns.find(x => x.name === 'name');
    column.formTemplate = this.formTemplate;
  }

  onFormValueChange(dynElement, value) {
    this.dataManager.item[dynElement.name] = value;
  }

see also multi-select-demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants