Comments (9)
@bmfteixeira Usually an example of code on how you expect it to be helps a lot understanding the issue. Just make a very simple example of input and expected output and from there on ideas and implementation might be done faster rather than going back and forth with replies.
from vue-good-table.
Alright! iteration 1 of this feature is now available in v1.3.0.
Example Usage:
<vue-good-table
title="Dynamic Table"
:columns="columns"
:rows="rows"
:lineNumbers="true"
:defaultSortBy="{field: 'age', type: 'asec'}"
:globalSearch="true"
:paginate="true"
styleClass="table condensed table-bordered table-striped">
<template slot="table-row" scope="props">
<td>{{ props.row.name }}</td>
<td class="fancy">{{ props.row.age }}</td>
<td>{{ props.row.percent }}</td>
</template>
</vue-good-table>
from vue-good-table.
Great to see this @xaksis. Will try in a near future.
from vue-good-table.
hey @bmfteixeira! tell me more?
If you mean html elements within table cells, you can do that by setting html: true
on column
https://github.com/xaksis/vue-good-table#column-options
from vue-good-table.
Hey @xaksis, not really HTML elements (which is already good 👍 ) but custom elements. Like, passing slots to my table cells with my components to be rendered.
from vue-good-table.
hmm. that would be tough, given that the rows are generated dynamically based on your data object. If you explain your use case more, i'll see if it is feasible. Do you wanna show custom vue components inside your dynamically generated table cells?
from vue-good-table.
Just getting inspired on datatables from Vuetify:
Input: https://github.com/vuetifyjs/docs/blob/master/examples/tables/3.vue
Ouput: https://vuetifyjs.com/components/data-tables (search for #3 - ignore search and pagination stuff)
What happens is that they manage the cell's content by slot. The sorting is done by a cell property. This give a lot of leeway to build a dynamic table :)
from vue-good-table.
@bmfteixeira I see what you mean now. they use scoped slots to let you decide how to display tds within a row.
Could be a good usecase for an advanced version. I'll look into it but can't commit to this just yet. Thank you for bringing it up though and apologies for not understanding the use case initially.
from vue-good-table.
All good @xaksis. I think this is a major feature and will bring the vue-good-table to another level (once everyone can make the table way more dynamic). Good luck with that and maybe I'll try to give you a hand if I have time to it 👍
from vue-good-table.
Related Issues (20)
- how do I add tfoot?
- originalIndex different on mobile (tested in Safari on iOS) HOT 1
- Execute a function once when the dropdown is changed
- How do I add a new row?
- Property "$createElement" was accessed during render but is not defined on instance.
- Highlight search queries
- filter doesn't work in some columns
- Action button not showing when selecting a record using checkbox
- (vue-good-table-NEXT): Unable to dynamically set hidden column value
- searchFn not trigger when clean search key HOT 2
- Is this project active any longer? HOT 3
- 2 Data in 1 Row SearchFilter
- Not fully supported for RTL language HOT 1
- Preserving Selected Rows After Filtering HOT 1
- How to scroll to a specific line on vue good table HOT 4
- Cannot run app with basic table HOT 2
- mode='remote' + dropdownAllowAll enabled and selected >> total changes we should keep currentPerPage to -1
- Editable Component Value Propagation Issue
- Won't render using ts
- Updating the table when row data changes after AJAX requeset
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-good-table.