Skip to content

Datatable View: Row edit feature #1627

Answered by slavco86
benj35 asked this question in PrimeVue
Discussion options

You must be logged in to vote

We have had exactly the same issue today and found that row editing functionality is very basic and limited in DataTable.
What we have opted was for is a custom actions column and being in full control of the look and feel of the action buttons... which means also manually handling the editing events, data updates, etc.

The only "native" way of achieving single row editing functionality I found was via a pt prop like so:

<Column
        row-editor
        :pt="{
          rowEditorInitButton: ({ instance: { editingMeta } }) => ({
            disabled: !!editingMeta[1]
          })
        }"
      />

reason for [1] accessor is because editingMeta weirdly enough is not an Array as editing…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@benj35
Comment options

Answer selected by benj35
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants