mirror of
https://github.com/pnp/sp-dev-fx-webparts.git
synced 2025-03-06 19:59:46 +00:00
Updated regex in default tax values
The regex was not capturing > 2 values correctly
This commit is contained in:
parent
c0adbde8a9
commit
3055df775f
@ -300,7 +300,7 @@ class ListForm extends React.Component<IListFormProps, IListFormState> {
|
||||
const data = this.state.fieldsSchema
|
||||
.reduce((newData, fld) => {
|
||||
if (fld.DefaultValue && fld.FieldType.indexOf("TaxonomyField") > -1) {
|
||||
newData[fld.InternalName] = fld.DefaultValue.replace(new RegExp("([#]?[0-9]+;#)", "g"), "")
|
||||
newData[fld.InternalName] = fld.DefaultValue.replace(new RegExp("([#][0-9]+;#|^[0-9]+;#)", "g"), "")
|
||||
} else {
|
||||
newData[fld.InternalName] = fld.DefaultValue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user