Group By

Configure default group-by and grouping options

Overview

Group By organizes data into collapsible sections (Table, List, Gallery, Board).

1. How To Set Default

Set default group config in DataViewProvider:

<DataViewProvider
  controller={controller}
  defaults={{
    group: {
      propertyType: "status",
      propertyId: "availability",
      showAs: "option",
      sort: "asc",
      hideEmpty: false,
      showCount: true,
    },
  }}
  properties={properties}
>
  <NotionToolbar enableSettings />
  <TableView pagination="page" />
</DataViewProvider>

2. What Are The Options

Groupable Property Types

TypeSupported
select✅ Yes
multiSelect✅ Yes
status✅ Yes
date✅ Yes
text✅ Yes
number✅ Yes
checkbox✅ Yes
formula / button / filesMedia❌ No

Shared Options

OptionTypeDefaultDescription
sort"asc" | "desc""asc"Group order
hideEmptybooleanfalseHide empty groups
showCountbooleantrueShow count in group headers

Type-specific Options

Property TypeOption
statusshowAs: "option" or "group"
dateshowAs: "day", "week", "month", "year", or "relative"
datestartWeekOn: "monday" or "sunday" (when showAs = "week")
textshowAs: "exact" or "alphabetical"
numbernumberRange: { range: [min, max], step }