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

If I add a template with slot='table-row-after', there is a missing th #136

Closed
ianhd opened this issue Dec 10, 2017 · 2 comments
Closed

Comments

@ianhd
Copy link

ianhd commented Dec 10, 2017

How do I specify a column for my custom template column?

Example:

    <vue-good-table :columns="columns"
                    :rows="rows">
        <template slot="table-row-after" scope="props">
            <td>{{ props.row.myField }}</td>
        </template>
    </vue-good-table>

If I specify 2 columns in my columns attribute, then have that third column defined via template, then there ends up being just 2 th's in the <thead>. How do I specify a third column, one where I can do something like {label: 'myField'} (I can't b/c field is required, which I don't need b/c I'm defining it myself). Screenshot below. Thanks!

https://i.imgur.com/DcoiV7U.png

@ianhd ianhd changed the title If I add a template wit slot='table-row-after', there is a missing th If I add a template with slot='table-row-after', there is a missing th Dec 10, 2017
@arivera12
Copy link

I am not really sure if your issue is certainly referenced with my issue but

There is an issue with <td> and <th> elements when using slots.

Take a look of my link 138

I am trying to look what is wrong with <td> that aren't being rendered on IE11.

All versions of IE aren't not working as expected.

@xaksis
Copy link
Owner

xaksis commented Dec 13, 2017

@ianhd you'll need to specify the header for the third column as well. Field in this case is optional (I will update the document to reflect this). the template is only for the row data. so your columns should look something like:

columns: [
 {
    label: 'columnA',
    field: 'fieldA',
},
{
    label: 'columnA',
    field: 'fieldA',
},
{
    label: 'Dynamic Column',
},
]

closing this. Let me know if this doesn't work for you and I'll re-open.

@xaksis xaksis closed this as completed Dec 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants