acdh-oeaw / acdh-noske-search

https://www.npmjs.com/package/acdh-noske-search
MIT License
1 stars 0 forks source link

missing structure refs in results interfere with result table layout #7

Open cfhaak opened 6 days ago

cfhaak commented 6 days ago

grafik Some data might be heterogeneous in the sense of containing different structure levels or even token with no other parent structure then doc. These differences interfere with the table rendering the results, when the existence of such structures is expected. See the missing paragraph.id in the second line-object see it irl

cfhaak commented 6 days ago

Workaround would be to calculate the number of required table columns based on the longest hit in the current lines-array, by iterating and counting non empty ref-strings per row and populating a list of used list-index numbers. Then one could display the empty values of shorter hits to genreate the same amount of columns accordingly.