Skip to content

Commit

Permalink
Remove height setting, solve no source link bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dana-cfc4 committed Jan 23, 2023
1 parent 78cb29f commit 03216e3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
7 changes: 1 addition & 6 deletions src/Blocks/EmbedEEATableauBlock/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,14 @@ const Schema = (props) => {
{
id: 'default',
title: 'Default',
fields: ['vis_url', 'height', 'show_sources', 'dataprotection'],
fields: ['vis_url', 'show_sources', 'dataprotection'],
},
],
properties: {
vis_url: {
widget: 'object_by_path',
title: 'Visualization',
},
height: {
title: 'Height',
type: 'number',
default: 450,
},
show_sources: {
title: 'Toggle sources',
type: 'boolean',
Expand Down
24 changes: 13 additions & 11 deletions src/Sources/Sources.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,19 @@ const SourcesWidget = ({ sources }) => {
<ul>
{sources &&
sources.data &&
sources.data.map((param, i) => (
<li key={i} className="embed-source-param">
<UniversalLink
className="embed-sources-param-title"
href={param.link}
>
{param.title}
</UniversalLink>
, {param.organisation}
</li>
))}
sources.data.map((param, i) =>
param.link ? (
<li key={i} className="embed-source-param">
<UniversalLink
className="embed-sources-param-title"
href={param.link}
>
{param.title}
</UniversalLink>
, {param.organisation}
</li>
) : null,
)}
</ul>
)}
</div>
Expand Down

0 comments on commit 03216e3

Please sign in to comment.