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

Dropdown inside datable using showClear causing: Cannot read property 'classList' of null #586

Closed
renathoaz opened this issue Oct 19, 2020 · 2 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@renathoaz
Copy link

      <Column columnKey="test"> 
           <template #body>
                <Dropdown   v-model="selectedCity" appendTo="body" :options="cities" optionLabel="name" :showClear="true" placeholder="Select a City" />
            </template>
      </Column>

When I click on clear icon the follow error appears: Cannot read property 'classList' of null

client.js?06a0:96 TypeError: Cannot read property 'classList' of null
    at Function.hasClass (DomHandler.js?3a94:178)
    at Function.isClickable (DomHandler.js?3a94:535)
    at VueComponent.onRowClick (DataTable.vue?47e1:639)
    at row-click (DataTable.vue?47c5:151)
    at invokeWithErrorHandling (vue.runtime.esm.js?2b0e:1854)
    at VueComponent.invoker (vue.runtime.esm.js?2b0e:2179)
    at invokeWithErrorHandling (vue.runtime.esm.js?2b0e:1854)
    at VueComponent.Vue.$emit (vue.runtime.esm.js?2b0e:3888)
    at VueComponent.onRowClick (TableBody.vue?26a5:391)
    at click (TableBody.vue?aeb8:78)

I inspected the func, isClickable and the element.parentElement is always null, It should have the dropdown element.

Is it a bug? or am I doing something wrong ?
by the way outside datatable body template, it works perfectly,
the error only happens inside datatable.

@cagataycivici cagataycivici self-assigned this Oct 21, 2020
@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Oct 21, 2020
@cagataycivici cagataycivici added this to the 3.0.1 milestone Oct 21, 2020
@renathoaz
Copy link
Author

Sorry for commenting in a closed issue, but any possibility of having this issue fixed on a v2 release ?
I still need to use primevue v2.

@cagataycivici
Copy link
Member

Yes, please see;

#664

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