@@ -354,7 +354,13 @@ impl TableState {
354impl<'a> Table<'a> {
354impl<'a> Table<'a> {
355 // type State = TableState;
355 // type State = TableState;
357+ pub fn render_table(
357− pub fn render_table(mut self, area: Rect, buf: &mut Buffer, state: &mut TableState) {
361+ state: &mut TableState,
358 if area.area() == 0 {
364 if area.area() == 0 {
@@ -401,6 +407,7 @@ impl<'a> Table<'a> {
401 width: *width,
407 width: *width,
402 height: max_header_height,
408 height: max_header_height,
405 col += *width + self.column_spacing;
412 col += *width + self.column_spacing;
@@ -457,6 +464,7 @@ impl<'a> Table<'a> {
457 width: *width,
464 width: *width,
458 height: table_row.height,
465 height: table_row.height,
461 col += *width + self.column_spacing;
469 col += *width + self.column_spacing;
@@ -464,20 +472,24 @@ impl<'a> Table<'a> {
467−fn render_cell(buf: &mut Buffer, cell: &Cell, area: Rect) {
475+fn render_cell(buf: &mut Buffer, cell: &Cell, area: Rect, truncate: bool) {
468 buf.set_style(area, cell.style);
476 buf.set_style(area, cell.style);
469 for (i, spans) in cell.content.lines.iter().enumerate() {
477 for (i, spans) in cell.content.lines.iter().enumerate() {
470 if i as u16 >= area.height {
478 if i as u16 >= area.height {
482+ buf.set_spans_truncated(area.x, area.y + i as u16, spans, area.width);
473− buf.set_spans(area.x, area.y + i as u16, spans, area.width);
484+ buf.set_spans(area.x, area.y + i as u16, spans, area.width);
477impl<'a> Widget for Table<'a> {
489impl<'a> Widget for Table<'a> {
478 fn render(self, area: Rect, buf: &mut Buffer) {
490 fn render(self, area: Rect, buf: &mut Buffer) {
479 let mut state = TableState::default();
491 let mut state = TableState::default();
480− Table::render_table(self, area, buf, &mut state);
492+ Table::render_table(self, area, buf, &mut state, false);