Skip to content
This repository was archived by the owner on Jun 22, 2020. It is now read-only.
This repository was archived by the owner on Jun 22, 2020. It is now read-only.

Can this make a cell span columns or rows? #14

Open

Description

@ZaLiTHkA

I'm working through a number of different Angular "table builder" modules at the moment, found this one just now and it was by far the easiest to get going with straight-out-the-box. The others that I've looked at so far have simply been way too "over the top" with functionality that my current project will literally never use... However, there are a few small things I'm battling to work out here.

Not sure if I'm just missing something from the examples on the linked stackblitz.io page, but perhaps someone could tell me if ng-table-builder can generate tables with the following example layout:

Table Title
Label: Value Label: Value
Label: Value Label: Value

This involves two things that I haven't managed to work out so far:

  1. Using the colspan attribute to make one header cover all columns (I would also like to use rowspan, but that's not required)
  2. Showing multiple entries per row, so where my source data is an array of 4 entries, and I have 2 on each table row.

Regarding point 2, if this module has no way to cater for this specifically, I can quite easily restructure my source data on the fly to have 2 entries, joining them in code before pushing them to the table... So that's no big issue, but the column (and hopefully row) spanning is a necessity for me.

Any ideas?

Activity

  1. ZaLiTHkA commented on Feb 14, 2020

    @ZaLiTHkA
    Author

    Ok, hang on.. I just noticed the ngx-header and ngx-footer, which almost works for the example in my previous post. However I can't seem to get rid of the column header row, it's either an empty cell, a custom string, or extrapolated from the column source.

    In order words, the closest I can get using ngx-header is effectively (with different markup, obviously):

    Table Title
           
    Label: Value Label: Value
    Label: Value Label: Value
  2. splincode commented on Feb 14, 2020

    @splincode
    Member

    currently the column names cannot be disabled, if this is a bug, I can start this issue

  3. ZaLiTHkA commented on Feb 14, 2020

    @ZaLiTHkA
    Author

    I wouldn't call that a bug, no.. But looking through the options presented by WebStorm's intellisense on the ngx-column markup element, it seems there are currently no options to "hide" or "disable" the header, so that would just be a nice feature to have. :)

    Unfortunately though, having the ability to configure column and/or row spanning is a necessity for my current project, so that is still the most important part of my query here.


    Here's a table example that can't be built without the use of colspan on certain cells:

    Device A Device B
    Section Title
    Category: value 1 value 2
    Category: value 1 value 2
    Section Title
    Category: value 1 value 2
    Category: value 1 value 2

    FWIW: the reason I'm looking to use a table "builder" system of sorts (as opposed to simply using static markup) is because the app in which this is used needs to cater for a variable number of "devices" in the above example... So as more of them are included in the source data, the table will grow horizontally with an additional column for each one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions