SplitButton inside DataTable.

UI Components for Vue
Post Reply
Abnaberth
Posts: 1
Joined: 26 May 2021, 20:32

13 Sep 2022, 17:13

Hi,

I already have some items in MenuModel's array and need to apply it to give some actions in each table row. How is possible to SplitButton trigger DataTable row selection and pass this data correctly to command MenuModel?

Code: Select all

<DataTable
	...
>
	...
	<Column>
		<template #body="{ data }">
			<SplitButton
				label="..."
				:model="menu"
				class="..."
			/>
		</template>
	</Column>
</DataTable>
{
	...,
  	data () {
  		return {
  			menu: [
  				{
  					label: 'Show Details', icon: 'pi pi-fw pi-search', command: event => console.log(event)
  				}
  			]
  		}
  	}
}

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest