Go to file
Ryan O'Hern 9b7db214b6
Update DataTable.vue
When wrapping vue components, default slots get nested inside the slot's children array. So if you attempt to pass default slots down through multiple layers, they will be nested further. See link below. Currently, the DataTable component can only be wrapped once as the computed property for columns() only checks against the children array and is not recursive. If you attempt to wrap the components inside multiple layers, it does not work. Proposed is an update to the columns computed property to make it recursive. 

https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPHNjcmlwdCBzZXR1cD5cbmltcG9ydCBHcmFuZFBhcmVudCBmcm9tICcuL0dyYW5kUGFyZW50LnZ1ZSc7XG5cblxuPC9zY3JpcHQ+XG5cbjx0ZW1wbGF0ZT5cbiAgPGgxPkdyZWF0R3JhbmRQYXJlbnQ8L2gxPlxuICA8R3JhbmRQYXJlbnQ+XG4gIFx0PHNwYW4+Q29sdW1uIDE8L3NwYW4+XG4gICAgPHNwYW4+Q29sdW1uIDI8L3NwYW4+XG4gICAgPHNwYW4+Q29sdW1uIDM8L3NwYW4+XG4gICAgPHRlbXBsYXRlICNjdXN0b20+XG4gICAgXHQ8c3Bhbj5DdXN0b20gMTwvc3Bhbj5cbiAgICAgIDxzcGFuPkN1c3RvbSAyPC9zcGFuPlxuICAgIDwvdGVtcGxhdGU+XG4gIDwvR3JhbmRQYXJlbnQ+XG48L3RlbXBsYXRlPiIsImltcG9ydC1tYXAuanNvbiI6IntcbiAgXCJpbXBvcnRzXCI6IHtcbiAgICBcInZ1ZVwiOiBcImh0dHBzOi8vdW5wa2cuY29tL0B2dWUvcnVudGltZS1kb21AMy4yLjIwL2Rpc3QvcnVudGltZS1kb20uZXNtLWJyb3dzZXIuanNcIlxuICB9XG59IiwiQ2hpbGQudnVlIjoiPHRlbXBsYXRlPlxuICA8aDM+XG4gICAgQ2hpbGRcbiAgPC9oMz5cbjwvdGVtcGxhdGU+XG5cbjxzY3JpcHQ+XG5leHBvcnQgZGVmYXVsdCB7XG4gIG5hbWU6ICdDaGlsZCcsXG4gIG1vdW50ZWQoKSB7XG4gICAgY29uc29sZS5sb2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ZCBmcm9tICcuL0NoaWxkLnZ1ZSc7XG5leHBvcnQgZGVmYXVsdCB7XG4gIG5hbWU6ICdQYXJlbnQnLFxuICBjb21wb25lbnRzOiB7IENoaWxkIH0sXG4gIG1vdW50ZWQoKSB7XG4gICAgY29uc29sZS5sb2coJ1BhcmVudCBkZWZhdWx0IHNsb3RzJywgdGhpcy4kc2xvdHMuZGVmYXVsdCgpKTtcbiAgICBjb25zb2xlLmxvZygnUGFyZW50IGN1c3RvbSBzbG90cycsIHRoaXMuJHNsb3RzLmN1c3RvbSgpKTtcbiAgfSxcbn1cbjwvc2NyaXB0PiIsIkdyYW5kUGFyZW50LnZ1ZSI6Ijx0ZW1wbGF0ZT5cblx0PGgzPkdyYW5kUGFyZW50PC9oMz5cbiAgPFBhcmVudD5cbiAgICA8dGVtcGxhdGUgdi1mb3I9XCIoaW5kZXgsIG5hbWUpIGluICRzbG90c1wiIHYtc2xvdDpbbmFtZV0+XG4gICAgXHQ8c2xvdCA6bmFtZT1cIm5hbWVcIj48L3Nsb3Q+XG5cdFx0PC90ZW1wbGF0ZT5cbiAgPC9QYXJlbnQ+XG48L3RlbXBsYXRlPlxuXG48c2NyaXB0PlxuaW1wb3J0IFBhcmVudCBmcm9tICcuL1BhcmVudC52dWUnO1xuZXhwb3J0IGRlZmF1bHQge1xuICBuYW1lOiAnR3JhbmRQYXJlbnQnLFxuICBjb21wb25lbnRzOiB7IFBhcmVudCB9LFxuICBtb3VudGVkKCkge1xuICAgIGNvbnNvbGUubG9nKCdHcmFuZFBhcmVudCBkZWZhdWx0IHNsb3RzJywgdGhpcy4kc2xvdHMuZGVmYXVsdCgpKTtcbiAgICBjb25zb2xlLmxvZygnR3JhbmRQYXJlbnQgY3VzdG9tIHNsb3RzJywgdGhpcy4kc2xvdHMuY3VzdG9tKCkpO1xuICB9LFxufVxuPC9zY3JpcHQ+In0=
2021-11-04 14:14:39 -04:00
.github Update issue template 2021-05-08 13:42:35 +03:00
api-generator Fixed #1685 - Templating Support for ConfirmPopup 2021-11-02 12:47:22 +03:00
public Update theme files 2021-10-05 11:00:39 +03:00
src Update DataTable.vue 2021-11-04 14:14:39 -04:00
tests/unit Initialized repo with the sample project from vue-cli 2018-12-04 10:08:40 +03:00
.babelrc-lib babel config 2019-05-31 00:21:59 +03:00
.browserslistrc Initialized repo with the sample project from vue-cli 2018-12-04 10:08:40 +03:00
.editorconfig Added .editorconfig file 2020-01-20 13:54:43 +03:00
.eslintrc.js Update lint rules 2020-09-17 15:11:27 +03:00
.gitignore Update .gitignore 2021-05-10 11:29:36 +03:00
.npmignore Add graceful-fs 2020-09-09 12:18:25 +03:00
CHANGELOG.md update changelog 2021-10-25 18:42:21 +03:00
LICENSE.md Update year 2021-06-29 14:16:30 +03:00
README.md Update image 2021-10-26 19:55:19 +03:00
babel.config.js Update preset 2020-09-29 15:55:06 +03:00
build-meta.js Refactor on build to avoid compilling unncessary SFCs and copy all SFCs to dist 2021-01-18 18:38:34 +03:00
gulpfile.js Upgrade to gulp 4 2021-05-20 12:11:42 +02:00
package-build.json New dev iteration 2021-10-25 18:35:48 +03:00
package.json New dev iteration 2021-10-25 18:35:48 +03:00
postcss.config.js Initialized repo with the sample project from vue-cli 2018-12-04 10:08:40 +03:00
rollup.config.js Fixed #1642 - The virtualscroller component is missing in core.min.js 2021-10-06 16:14:44 +03:00
untitled replace core.js with core.min.js 2021-10-26 11:41:57 +03:00
vue.config.js Fixed #1447 - Set Paginator Page from InputNumber 2021-08-31 16:11:04 +03:00

README.md

License: MIT npm version Discord Chat

PrimeVue Hero

Website

Visit the PrimeVue Website for general information, demos and documentation.