Skip to content

Commit

Permalink
feat(table): remove action buttons in disabled state (#238)
Browse files Browse the repository at this point in the history
* 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 9037a3b
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions addon/templates/components/cf-field/input/table.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down

0 comments on commit 9037a3b

Please sign in to comment.