File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -68,9 +68,10 @@ function table(data, options = {}) {
68
68
const summaries = th .append (" div" ).classed (" summary" , true );
69
69
70
70
const textFields = fields .filter (({type}) => type === " Utf8" );
71
+ const tally = html ` <div style =" position : absolute ; right : 0 ;" >${ data .numRows .toLocaleString (" en-US" )} rows</div >` ;
71
72
const footer = html ` <footer style =" width : 100% ; height : 1em ;" >
72
73
${ textFields .length ? html ` <div style =" position : absolute ; left : 0 ;" ><input type =" search" placeholder =" Search text fields" onkeyup =${search} onchange =${search} ></div >` : " " }
73
- < div style = " position : absolute ; right : 0 ; " > ${ data . numRows . toLocaleString ( " en-US " ) } rows</ div >
74
+ ${ tally }
74
75
</footer >` ;
75
76
container .appendChild (footer);
76
77
@@ -97,6 +98,8 @@ function table(data, options = {}) {
97
98
const th = d3 .select (table).selectAll (" th" );
98
99
th .append ((d , i ) => thtype[i]);
99
100
th .append ((d , i ) => thsummary[i]);
101
+
102
+ tally .innerHTML = index === index0 ? ` ${ index .length } rows` : ` <b>${ index .length } </b> / ${ index0 .length } ` ;
100
103
}
101
104
102
105
function take (data , index ) {
You can’t perform that action at this time.
0 commit comments