nuxt / ui

A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.

Home Page:https://ui.nuxt.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Table] Emit event on function "onChange" when user select/unselect all rows by clicking on header checkbox

esorribas opened this issue · comments

Description

I think this would be interesting to who uses the table component with pagination from backend API and needs to know if user has selected the whole dataset.

For example: selecting all rows for export to excel.

Additional context

Example:

function onChange (checked: boolean) {
      if (checked) {
        selectAllRows()
      } else {
        selected.value = []
      }
      
      // Add emit here
      emit('select:all', checked)
    }