histories-in-transition / hit-astro

https://histories-in-transition.github.io/hit-astro/
0 stars 0 forks source link

implement msitems table with tabulator.js #23

Closed ivanadob closed 6 days ago

ivanadob commented 6 days ago

Can't make tabultor look into one object for two separate columns. In the case of msItems table, one need one column for work title and one for author, but both are in object title_work. Tabulator works with either of the two but not with both at the same time.

 {
            title: "Werk",
            field: "title_work",
            mutator: jsonpathLookup,
            mutatorParams: {
              path: "$[*].title",
              separator: "; ",
            },
            headerFilter: "input",
          },
            {
            title: "Autor",
            field: "title_work",
            mutator: jsonpathLookup,
            mutatorParams: {
              path: "$[*].author[*].name",
              separator: "; ",
            },
            headerFilter: "input",
          }, 
csae8092 commented 6 days ago

you could either preprocess the data before loading it into datatables or, what I would do, comibine author and work into one column -> e.g. Orosius, Historiae adversus paganos {author(s)}, {title}