Skip to content

Hotfix for 1937 and 1961 #1967

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/controls/dynamicForm/DynamicForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ export class DynamicFormBase extends React.Component<
if (fieldcolumnInternalName.startsWith('_x') || fieldcolumnInternalName.startsWith('_')) {
fieldcolumnInternalName = `OData_${fieldcolumnInternalName}`;
}
if (field.newValue !== null && field.newValue !== undefined) {
if (field.newValue !== undefined) {

let value = field.newValue;

Expand Down Expand Up @@ -491,7 +491,7 @@ export class DynamicFormBase extends React.Component<
value.push(element.key);
});
objects[`${fieldcolumnInternalName}Id`] = {
results: value.length === 0 ? null : value,
results: value.length === 0 ? [] : value,
};
}

Expand Down Expand Up @@ -774,7 +774,7 @@ export class DynamicFormBase extends React.Component<
const { useModernTaxonomyPicker } = this.props;
// Init new value(s)
field.newValue = newValue;
field.stringValue = newValue.toString();
field.stringValue = newValue? newValue.toString():'';
field.additionalData = additionalData;
field.subPropertyValues = {};

Expand Down
2 changes: 2 additions & 0 deletions src/controls/dynamicForm/dynamicField/DynamicField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ export class DynamicFieldBase extends React.Component<IDynamicFieldProps, IDynam
onSelectDate={(newDate) => { this.onChange(newDate, true); }}
disabled={disabled}
firstDayOfWeek={firstDayOfWeek}
allowTextInput={true}
/>}
{
dateFormat === 'DateTime' &&
Expand All @@ -364,6 +365,7 @@ export class DynamicFieldBase extends React.Component<IDynamicFieldProps, IDynam
onChange={(newDate) => { this.onChange(newDate, true); }}
disabled={disabled}
firstDayOfWeek={firstDayOfWeek}
allowTextInput={true}
/>
}
{descriptionEl}
Expand Down