Skip to content
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

Boolean field type #4367

Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion scripts/apps/authoring/authoring/preview-custom-field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class PreviewCustomField extends React.PureComponent<IProps> {
const FieldType = getField(field.custom_field_type);
const label = getLabelForFieldId(field._id, [field]);

if (FieldType == null || isEmpty(value)) {
if (FieldType == null || (typeof value !== 'boolean' && isEmpty(value))) {
return null;
}

Expand Down
22 changes: 12 additions & 10 deletions scripts/core/services/modalService.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,19 @@ export function showPrintableModal(

<div className="sd-full-preview--content-wrapper">
{
contentSections.map((section, i) => (
<div key={i}>
{ // always start a new article on a new page in print mode
i > 0 && pageBreak
}

<div className="sd-full-preview--content">
{section}
contentSections.map((section, i) => {
return (
<div key={i}>
{ // always start a new article on a new page in print mode
i > 0 && pageBreak
}

<div className="sd-full-preview--content">
{section}
</div>
</div>
</div>
))
);
})
}
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions scripts/extensions/booleanField/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
Loading
Loading