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)
  				}
  			]
  		}
  	}
}

wisdom-17
Posts: 1
Joined: 12 Nov 2022, 01:02

12 Nov 2022, 01:07

Hi @Abnaberth

Did you manage to figure this out? If so, can you share your solution please.

I am trying to accomplish this at the moment but can't find much resource online. Appreciate if you have anything to share.

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests