Giter Club home page Giter Club logo

Comments (3)

ratiw avatar ratiw commented on May 29, 2024

@securit The detail row is another table row directly underneath the current data row. It is supposed to be used to display additional information pertain to the given data row which may not have enough space or irrelevant to show on normal row, e.g. the contact info of a customer, etc.

The detail row callback makeDetailRow can only contain valid constructed html. The callback cannot processes any Vue related code, so it will just display what you return back to it. So, v-for will in your code will never work and gets ignore since it is not a known html attributes.

I'm not sure how you picture your log table output, so I can't really suggest anything. Sorry.

from vue-table.

securit avatar securit commented on May 29, 2024

Modifying makeDetailRow a little works a bit better, however it strips the <table> tag and doesnt take up the full width of the parent table

makeDetailRow: function (data) {
                var returnStr = '<div class="detail-row"><div class="form-group"><label>Properties: </label><table><tr>';

                for (var key in data.properties) {
                    if (data.properties.hasOwnProperty(key)) {
                        returnStr += '<td><ul>';
                        for (var attribute in data.properties[key]) {
                            returnStr += '<li><strong>' + attribute + ': </strong>' + data.properties[key][attribute] + '</li>';
                        }
                        returnStr += '</ul></td>';
                    }
                }

                returnStr += '</tr></table></div></div>';
                return (returnStr);

from vue-table.

ratiw avatar ratiw commented on May 29, 2024

@securit Your code looks fine. I really have no idea why the <table> tag was stripped.

In order for the inside table to take up the full width, you may need to use CSS to target it and set the width to 100%.

from vue-table.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.