プリセット
未保存 0 行・0 セル直したセルの左上に三角、行番号の左上に点が付きます。元の値へ打ち直すと消えます。右クリックでセル / 行 / 選択範囲の変更を取り消せます。「サーバーの値として取り込む」は書き換えた値を保存済みの値にします(直しているセルは自分の値のまま)。
この設定を再現するコード
<SpreadsheetGrid
rows={rows}
columns={columns}
onColumnsChange={setColumns}
onRowsChange={setRows}
rowKeyGetter={(row) => row.id}
height={440}
theme="class"
density="standard"
motion="auto"
showTopBar={true}
showBottomBar={true}
showFilterChipBar={false}
enableSorting={true}
enableColumnFilter={true}
enableGlobalFilter={true}
enableColumnMenu={true}
enableRangeSelection={true}
enableUndoRedo={true}
enableClearOnDelete={true}
readOnly={false}
dimReadOnlyCells={false}
showValidationMarks={true}
// columns の登録日: editor: { type: 'date', picker: 'calendar' }
// columns の出荷時刻: editor: { type: 'time', picker: 'list', step: 30 }
// columns の確認日時: editor: { type: 'datetime', defaultTime: '09:00', timeInput: true }
// columns のタグ: editor: { type: 'select', multiple: true, options: TAGS }(値は string[])
trackChanges
onChangesChange={({ rowCount }) => setUnsavedRows(rowCount)}
enableContextMenu
getContextMenuItems={(params) => params.revertItems ?? []}
find
fillHandle
enableRowSelection={false}
scrollHint={{ hintColumn: 'name' }}
columnGroups={[
{ key: 'item', title: '商品', children: ['name', 'category'] },
{ key: 'order', title: '受注', collapsible: { keep: ['status'] }, children: ['status', { key: 'amount', title: '数と値段', children: ['qty', 'price'] }] },
]}
// columns の数量列: conditionalFormat: { dataBar: {} } / 単価列: { colorScale: {} } / 状態列: { chips: { 受注: 'info', 出荷準備: 'warning', 出荷済: 'good', キャンセル: 'critical' } }
// columns: 商品名 aggFunc: 'count' / 数量 aggFunc: 'sum' / 単価 aggFunc: 'avg'
totalRow
/>