Skip to content

Commit

Permalink
1. Fixed error handling for replace function
Browse files Browse the repository at this point in the history
  • Loading branch information
kumehrot committed Oct 6, 2022
1 parent d84787e commit 4fa4982
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fluentui-editable-grid",
"version": "1.12.0",
"version": "1.12.1",
"license": "MIT",
"description": "Wrapper over the existing DetailsList that makes in-place editability work like a dream(among many other new features)",
"main": "dist/index.js",
Expand Down
13 changes: 13 additions & 0 deletions src/libs/editablegrid/addrowpanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,19 @@ const AddRowPanel = (props: Props) => {
value={columnValuesObj[item.key].value || ''}
/>);
break;
case EditControlType.Password:
tmpRenderObj.push(<TextField
errorMessage={columnValuesObj[item.key].error}
name={item.text}
id={item.key}
label={item.text}
styles={textFieldStyles}
onChange={(ev, text) => onTextUpdate(ev, text!, item)}
value={columnValuesObj[item.key].value || ''}
type="password"
canRevealPassword
/>);
break;
default:
tmpRenderObj.push(<TextField
errorMessage={columnValuesObj[item.key].error}
Expand Down
2 changes: 1 addition & 1 deletion src/libs/editablegrid/editablegrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1672,7 +1672,7 @@ const EditableGrid = (props: Props) => {
onClick={HandleCellOnClick(props, column, EditCellValue, rowNum)}
onDoubleClick={HandleCellOnDoubleClick(props, column, EditCellValue, rowNum)}
>
{item[column.key].replace(/./g, '*')}
{item[column.key]?.replace(/./g, '*')}
</span>;
}

Expand Down

0 comments on commit 4fa4982

Please sign in to comment.