Skip to content

Commit

Permalink
✨ [#469] Use data-list component from Utrecht
Browse files Browse the repository at this point in the history
  • Loading branch information
SilviaAmAm committed Nov 10, 2023
1 parent 23f1937 commit 753bcbe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/formio/templates/editGridRow.ejs
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
<dl class="utrecht-data-list utrecht-data-list--html-dl utrecht-data-list--rows">
{% for (const key in ctx.flattenedComponents) { %}
{% if (ctx.isVisibleInRow(ctx.flattenedComponents[key]) && ctx.flattenedComponents[key].label) { %}
<div>{{ctx.flattenedComponents[key].label}}: {{ ctx.getView(ctx.flattenedComponents[key], ctx.row[key]) }}</div>
{% } %}
{% if (ctx.isVisibleInRow(ctx.flattenedComponents[key]) && ctx.flattenedComponents[key].label) { %}
<div class="utrecht-data-list__item">
<dt class="utrecht-data-list__item-key">{{ctx.flattenedComponents[key].label}}</dt>
<dd class="utrecht-data-list__item-value utrecht-data-list__item-value--html-dd">
{{ ctx.getView(ctx.flattenedComponents[key], ctx.row[key]) }}
</dd>
</div>
{% } %}
{% } %}
</dl>

{% if (!ctx.self.options.readOnly) { %}
<p class="utrecht-button-group utrecht-button-group--openforms-editgrid" role="group">
Expand Down
1 change: 1 addition & 0 deletions src/scss/nl-design-system-community.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
@import '@utrecht/components/dist/form-fieldset/css/index.css';
@import '@utrecht/components/dist/radio-button/css/index.css';
@import '@utrecht/components/dist/alert/css/index.css';
@import '@utrecht/components/dist/data-list/css/index.css';

0 comments on commit 753bcbe

Please sign in to comment.