diff --git a/src/views/Editor/DataEditor.vue b/src/views/Editor/DataEditor.vue
index c9681fb..1d46202 100644
--- a/src/views/Editor/DataEditor.vue
+++ b/src/views/Editor/DataEditor.vue
@@ -1,5 +1,7 @@
@@ -30,6 +49,7 @@ DataTable(
:value='model'
editMode='row'
tableStyle='min-width: 50rem'
+ v-if='model.length > 0'
)
Column(
v-for='col of columns'
@@ -72,10 +92,65 @@ DataTable(
fluid
)
Column(
- :rowEditor='true'
+ rowEditor
style='width:10%;min-width:8rem;'
bodyStyle='text-align:center;'
)
+ template(
+ #body='slotProps'
+ )
+ Button.edit(
+ icon='pi pi-pencil'
+ aria-label='Row Edit'
+ rounded
+ severity='secondary'
+ variant='text'
+ :onClick=`(e) => {
+ slotProps.editorInitCallback(e)
+ }`
+ )
+ Button(
+ icon='pi pi-trash'
+ aria-label='Delete'
+ rounded
+ severity='danger'
+ variant='text'
+ :onClick=`(e) => {
+ onDeleteRow(e, slotProps)
+ }`
+ )
+ template(
+ #editor='slotProps'
+ )
+ Button(
+ icon='pi pi-save'
+ aria-label='Save Edit'
+ rounded
+ severity='secondary'
+ variant='text'
+ :onClick=`(e) => {
+ slotProps.editorSaveCallback(e)
+ }`
+ )
+ Button(
+ icon='pi pi-times'
+ aria-label='Cancel Edit'
+ rounded
+ severity='secondary'
+ variant='text'
+ :onClick=`(e) => {
+ slotProps.editorCancelCallback(e)
+ }`
+ )
+p(
+ v-else
+) There are no items yet!
+Button(
+ icon='pi pi-plus'
+ aria-label='Add New Item'
+ label='Add New Item'
+ @click='onAddRow'
+)