primefaces / primevue

Next Generation Vue UI Component Library

Home Page:https://primevue.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DataTable: @state-save emits only if state-key specified

wouldRewind opened this issue · comments

Describe the bug

DataTable @state-save emits only if state-key provided. I think it is a bug or flaw, because in case I want to sync table state with my backend service, I have to find some workaround about this (because I don`t want to use any type of storage - neither "local" nor the "session").

For example: we have prop "v-model:filters", but there is no prop "v-model:columnsWidth" or "v-model:columnsOrders", but I need them. So, that would be very convenient if @state-save emits event, even when state-key prop is not specified.

Reproducer

https://v3.primevue.org/datatable/#stateful

PrimeVue version

3.52.0

Vue version

3.x

Language

TypeScript

Build / Runtime

Vue CLI App

Browser(s)

No response

Steps to reproduce the behavior

  1. Create DataTable, fil it with some data.
  2. Add "@state-save" handler
  3. set prop "state-key" = undefined
  4. make sure @state-save is not emitted

Expected behavior

@state-save emits event, even when state-key prop equal undefined.

Issue tracker is used for defects only as part of our commitment to quality and continuous improvement in all areas. Enhancements are collected as valuable community feedback and managed internally so moving this enhancement ticket to our internal project management backlog.

For enhancement requests and other topics, you can open a new topic in PrimeVue discussions.