primefaces / primevue

Next Generation Vue UI Component Library
https://primevue.org
MIT License
10.49k stars 1.22k forks source link

DataTable: In menu filter bug: Uncaught TypeError: Cannot read properties of undefined (reading '0') #6396

Open mtnoronha opened 1 month ago

mtnoronha commented 1 month ago

Describe the bug

If the table is set to display the filters on menu mode: filterDisplay="menu"

We get an error when changing the operation type. E.g: From 'Contains' to 'Equals':


Uncaught TypeError: Cannot read properties of undefined (reading '0')
    at Proxy.onMenuMatchModeChange (primevue_datatable.js?v=6a184f4f:3483:39)
    at onUpdateModelValue (primevue_datatable.js?v=6a184f4f:3936:33)
    at callWithErrorHandling (chunk-YBIACCRJ.js?v=f96c3d14:2305:19)
    at callWithAsyncErrorHandling (chunk-YBIACCRJ.js?v=f96c3d14:2312:17)
    at emit (chunk-YBIACCRJ.js?v=f96c3d14:8459:5)
    at Proxy.updateModel (chunk-WPQZ4WDV.js?v=f96c3d14:1071:12)
    at Proxy.onOptionSelect (chunk-WPQZ4WDV.js?v=f96c3d14:662:12)
    at onClick (chunk-WPQZ4WDV.js?v=f96c3d14:1509:37)
    at callWithErrorHandling (chunk-YBIACCRJ.js?v=f96c3d14:2305:19)
    at callWithAsyncErrorHandling (chunk-YBIACCRJ.js?v=f96c3d14:2312:17)

Reproducer

https://stackblitz.com/edit/zodgqj?file=src%2FApp.vue

PrimeVue version

3.53.0

Vue version

4.x

Language

TypeScript

Build / Runtime

Vue CLI App

Browser(s)

Chrome

Steps to reproduce the behavior

1 - Make sure table is in filterDisplay="menu" 2 - Click on Filter Icon next to column's name 3 - Click on the operator's dropdown 4 - Select another operator

image

Expected behavior

You can switch between different operations on filter

tan-wood commented 1 month ago

I am having this same issue!

anuzpandey commented 1 month ago

I am having the same issue as well.

marcoarruda commented 1 month ago

I'm having the same issue!

dsantos80PT commented 1 month ago

I came across this issue a few days ago.

AngelReyesEspinal commented 1 month ago

I'm having the same issue!,

Does anyone has a solution?

cc: Primevue's team :(

AngelReyesEspinal commented 1 month ago

Still nothing :( ?

tan-wood commented 1 month ago

How do we get this pushed through? This seems like a pretty big bug

arjunarmino commented 2 weeks ago

any workaround?