Skip to content

Compatibility with Electron #98

@dsl101

Description

@dsl101

I'm very new to electron, so might just have something badly set up, but I can't get the basic 'hello world' of editable-grid to display properly. So far I've:

  • Set up and got electron hello world working OK
  • Installed editable-grid via npm
  • Made sure jQuery is working within electron (so I could use el: $('body'))

From what I can see, the app's content is correct, grid.css (not using LESS) is being included, and the empty <body> tag ends up with the correct table contents. But the display just doesn't look right - see screenshot.

Have I missed something obvious? Or is there something about editable-grid that means it wouldn't work with electron? I'm sure there's other info you might need - please let me know...

electron app source:

awsmanager.html:

<html style="background: #fff">
    <head>
        <link rel="stylesheet" href="./grid.css">
        <script>window.$ = window.jQuery = require('jquery');</script>
        <script src='./awsmanager.js'></script>
    </head>
    <body>
    </body>
</html>

awsmanager.js:

var Grid = require('editable-grid');

$(function() {
    console.log('Loaded');
    var grid = new Grid({
        el: $('body'),
        columns: [
            {
                id: 'a',
                title: 'a',
                width: '33.3%'
            },
            {
                id: 'b',
                title: 'b',
                width: '33.3%',
                alignment: 'right',
                titleAlignment: 'center'
            },
            {
                id: 'c',
                title: 'c',
                width: '33.3%',
                alignment: 'center',
                titleAlignment: 'right'
            }
        ],
        data: [
            {
                id: 'id-1',
                a: 'a',
                b: 'b',
                c: 'c'
            },
            {
                id: 'id-2',
                a: 'a',
                b: 'b',
                c: 'c'
            }
        ]
    });

    grid.render();
});

resulting app:

image 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions