Skip to content

Commit 4872a72

Browse files
Merge pull request #127 from microsoft/feature
1. Fixed error handling for replace function
2 parents 081e193 + 4fa4982 commit 4872a72

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fluentui-editable-grid",
3-
"version": "1.12.0",
3+
"version": "1.12.1",
44
"license": "MIT",
55
"description": "Wrapper over the existing DetailsList that makes in-place editability work like a dream(among many other new features)",
66
"main": "dist/index.js",

src/libs/editablegrid/addrowpanel.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,19 @@ const AddRowPanel = (props: Props) => {
115115
value={columnValuesObj[item.key].value || ''}
116116
/>);
117117
break;
118+
case EditControlType.Password:
119+
tmpRenderObj.push(<TextField
120+
errorMessage={columnValuesObj[item.key].error}
121+
name={item.text}
122+
id={item.key}
123+
label={item.text}
124+
styles={textFieldStyles}
125+
onChange={(ev, text) => onTextUpdate(ev, text!, item)}
126+
value={columnValuesObj[item.key].value || ''}
127+
type="password"
128+
canRevealPassword
129+
/>);
130+
break;
118131
default:
119132
tmpRenderObj.push(<TextField
120133
errorMessage={columnValuesObj[item.key].error}

src/libs/editablegrid/editablegrid.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1672,7 +1672,7 @@ const EditableGrid = (props: Props) => {
16721672
onClick={HandleCellOnClick(props, column, EditCellValue, rowNum)}
16731673
onDoubleClick={HandleCellOnDoubleClick(props, column, EditCellValue, rowNum)}
16741674
>
1675-
{item[column.key].replace(/./g, '*')}
1675+
{item[column.key]?.replace(/./g, '*')}
16761676
</span>;
16771677
}
16781678

0 commit comments

Comments
 (0)