Skip to content
Permalink
Browse files

feat(table): remove action buttons in disabled state (#238)

* feat(table): remove action buttons in disabled state

* refactor(table): show edit button in disabled state

* style(table): fix indents and always display tfoot
  • Loading branch information...
Yelinz authored and czosel committed May 14, 2019
1 parent 88a1ae9 commit 9037a3b056da773c1f38f516e87b80af5e2ce9eb
Showing with 10 additions and 6 deletions.
  1. +10 −6 addon/templates/components/cf-field/input/table.hbs
@@ -24,17 +24,21 @@
{{/if}}
<td class="uk-text-right">
<button type="button" data-test-edit-row class="uk-icon-button" uk-icon="pencil" {{action "editRow" document}}></button>
<button type="button" data-test-delete-row class="uk-icon-button" uk-icon="trash" {{action (perform deleteRow) document}}></button>
{{#unless disabled}}
<button type="button" data-test-delete-row class="uk-icon-button" uk-icon="trash" {{action (perform deleteRow) document}}></button>
{{/unless}}
</td>
</tr>
{{/each}}
</tbody>
<tfoot>
<tr>
<td colspan={{add (count-keys questions) 1}} class="uk-text-center">
{{#uk-button size="small" on-click=(perform addRow)}}{{uk-icon "plus"}}{{/uk-button}}
</td>
</tr>
{{#unless disabled}}
<tr>
<td colspan={{add (count-keys questions) 1}} class="uk-text-center">
{{#uk-button size="small" on-click=(perform addRow)}}{{uk-icon "plus"}}{{/uk-button}}
</td>
</tr>
{{/unless}}
</tfoot>
</table>
{{#uk-modal visible=(and showModal documentToEdit) bgClose=false}}

0 comments on commit 9037a3b

Please sign in to comment.
You can’t perform that action at this time.