swimlane / ngx-datatable

✨ A feature-rich yet lightweight data-table crafted for Angular
http://swimlane.github.io/ngx-datatable/
MIT License
4.62k stars 1.68k forks source link

lose focus in multiple inputbox of a row #1037

Open BearandYoon opened 6 years ago

BearandYoon commented 6 years ago

I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

Current behavior I have implement multiple inputbox in a row. when I type in a inputbox, after type a character I lose the focus from input box.

Expected behavior I expect to keep the focus in input box.

Reproduction of the problem This is my code snippet.

          <ngx-datatable-column name="urls" [flexGrow]="5" headerClass="kartList-header">
            <ng-template let-karts="column" let-sort="sortFn" ngx-datatable-header-template>
              <span class="cursor-pointer" (click)="sort()">Url</span>
            </ng-template>
            <ng-template let-rowIndex="rowIndex" let-value="value" let-row="row" ngx-datatable-cell-template>
              <div class="url" *ngIf="!row.edit">
                <p *ngFor="let url of value">{{url}}</p>
              </div>
              <div class="url" *ngIf="row.edit">
                <div *ngFor="let url of row.urls; let i = index;">
                  <input type="text" class="editable-url" [(ngModel)]="row.urls[i]">
                </div>
              </div>
            </ng-template>
          </ngx-datatable-column>

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

Operating System : MacOs, IDE : WebStorm 2017.2.4, PM: NPM

screen shot 2017-10-06 at 11 12 30

sunnygb commented 6 years ago

+1

DonJuwe commented 5 years ago

+1