IgniteUI / igniteui-react

High-Performance Data Grid and High-Volume Data Charts
Other
6 stars 1 forks source link

Cannot edit cell value in text input as edit template #61

Closed wnvko closed 7 months ago

wnvko commented 7 months ago

Description

I want to use IgrInput, type text, as cell edit template.

Steps to reproduce

Add IgrInput as cell edit template in the grid. I am using this code:

const textInputInlineEditorTemplate = (ctx: { dataContext: IgrCellTemplateContext }) => {
  return (
    <>
      <IgrInput type="text" value={ctx.dataContext.cell.editValue} change={(_s: IgrInput, e: IgrComponentValueChangedEventArgs) => ctx.dataContext.cell.editValue = e.detail}></IgrInput>
    </>
  );
}

return (
  <>
    <div className={classes("column-layout master-view-container")}>
      <IgrGrid data={people} primaryKey="id" rowEditable="true" autoGenerate="false">
        <IgrColumn field="first_name" dataType="string" inlineEditorTemplate={textInputInlineEditorTemplate}></IgrColumn>
      </IgrGrid>
    </div>
  </>
);

Result

Puttin the cell, with IgrInput as cell edit template, in edit mode the input appears with value equal to the cell value. This is ok. The input value is not editable at all. Note: if the type of IgrInput is number it is working as expected!

Expected result

Should be able to use IgrInput as cell editor and to update the cell value.

MayaKirova commented 7 months ago

Related to https://github.com/IgniteUI/igniteui-angular/issues/14020

dkamburov commented 7 months ago

Cherry-picked to blazor branch https://github.com/IgniteUI/igniteui-angular/pull/12125/commits/758c8fc4962725964da53f021320812b1ebfabeb

MayaKirova commented 7 months ago

@wnvko Fix is available in internal build 23.2.607 and will be available in the next public release.