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

Table component calls vue.extend when columns are specified #41

Closed
jkulubya opened this issue Oct 14, 2020 · 5 comments
Closed

Table component calls vue.extend when columns are specified #41

jkulubya opened this issue Oct 14, 2020 · 5 comments
Labels
bug Something isn't working workaround

Comments

@jkulubya
Copy link

Overview of the problem

Oruga version: [0.2.2]
Vuejs version: [3.0.0]
OS/Browser: macOS/FF82

Description

The o-table component calls vue.extend when you specify an array of columns, but vue.extend doesn't exist in Vue 3.
See here

const TableColumnComponent = VueInstance.extend(TableColumn)

Steps to reproduce

  1. Install oruga vnext
  2. Save and run template with o-table component and columns prop set

Expected behavior

Table to render

Actual behavior

Error in console:

Uncaught (in promise) TypeError: _plugins_4daf8ef8_js__WEBPACK_IMPORTED_MODULE_1__.V.extend is not a function
@jtommy jtommy added the bug Something isn't working label Oct 14, 2020
@djfuzzy
Copy link

djfuzzy commented Oct 22, 2020

Any more info about this? (i.e. when it will be fixed, possible workarounds, etc)

@jtommy
Copy link
Member

jtommy commented Oct 22, 2020

The workaround is to use default slots and not columns prop

@djfuzzy
Copy link

djfuzzy commented Oct 22, 2020

Thank you for the quick reply. I'm new to Vue and although I understand the concept of slots, I'm not sure how to apply them here. Have any hints? Should I be putting my table HTML structure in the slot?

@jtommy
Copy link
Member

jtommy commented Oct 22, 2020

Take a look at docs, sandbox example

@jtommy
Copy link
Member

jtommy commented Nov 9, 2020

Fixed d75cb66

@jtommy jtommy closed this as completed Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working workaround
Projects
None yet
Development

No branches or pull requests

3 participants