Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tailwind Datatable: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'frozen') #4566

Closed
johnluxor opened this issue Oct 5, 2023 · 0 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@johnluxor
Copy link

Describe the bug

In Unstyled mode, when component doesn't have any props I got this error
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'frozen')

This error goes to Tailwind theme and conditional styles

headercell: ({ context, props }) => ({
        class: [
          'text-left border border-solid border-gray-100 dark:border-blue-900/40 font-bold',
          'transition duration-200',
          context?.size === 'small' ? 'p-2' : context?.size === 'large' ? 'p-5' : 'p-3', // Size
          context.sorted ? 'bg-blue-50 text-blue-700' : 'bg-slate-50 text-slate-700', // Sort
          context.sorted ? 'dark:text-white/80 dark:bg-blue-300' : 'dark:text-white/80 dark:bg-gray-900', // Dark Mode
          {
            'sticky z-[1]': props.frozen || props.frozen === '', // Frozen Columns
            'border-x border-y': context?.showGridlines,
            'overflow-hidden space-nowrap border-y relative bg-clip-padding': context.resizable // Resizable
          }
        ]
      }),

So, looks like props is undefined when none of them is passed to the component

Reproducer

none

PrimeVue version

3.35

Vue version

3.x

Language

ES6

Build / Runtime

Vue CLI App

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@johnluxor johnluxor added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Oct 5, 2023
@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Oct 9, 2023
@tugcekucukoglu tugcekucukoglu added this to the 3.35.1 milestone Oct 9, 2023
@tugcekucukoglu tugcekucukoglu self-assigned this Oct 9, 2023
@tugcekucukoglu tugcekucukoglu changed the title Datatable: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'frozen') Tailwind Datatable: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'frozen') Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants