override def renderExampleContents()(implicit fsc: FSContext): NodeSeq = {
new Table5Base
with Table5BaseBootrapSupport
with Table5StandardColumns
with Table5SeqSortableDataSource
with Table5Paginated {
override type R = Country
override def defaultPageSize = 10
val ColName = ColStr("Name", _.name.common)
val ColCapital = ColStr("Capital", _.capital.mkString(", "))
val ColRegion = ColStr("Region", _.region)
val ColArea = ColStr("Area", _.area.toString)
override def columns(): List[C] = List(
ColName
, ColCapital
, ColRegion
, ColArea
)
override def rowsSorter: PartialFunction[Table5StandardColumn[Country], Seq[Country] => Seq[Country]] = {
case ColName => _.sortBy(_.name.common)
}
override def seqRowsSource: Seq[Country] = CountriesData.data
}.render()
}