Skip to content

Commit 45bc0bf

Browse files
committed
Fix bugs
1 parent 91f24ce commit 45bc0bf

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/spicedb-common/components/relationshipeditor/RelationshipEditor.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,7 @@ export function RelationshipEditor({
470470

471471
const getCellData = useCallback(
472472
([col, row]: readonly [number, number]): GridCell => {
473+
console.log("getting cell data")
473474
if (row >= data.length) {
474475
return {
475476
kind: GridCellKind.Text,
@@ -934,6 +935,8 @@ export function RelationshipEditor({
934935
});
935936
};
936937

938+
console.log("data dump")
939+
console.log(data)
937940
const { drawCell, provideEditor } = useCustomCells(
938941
relationshipsService,
939942
data,
@@ -1006,6 +1009,8 @@ export function RelationshipEditor({
10061009
label="Highlight same types, objects and relations"
10071010
/>
10081011
</div>
1012+
{console.log("this is how long we think data is")}
1013+
{console.log(data.length)}
10091014
<DataEditor
10101015
theme={dataEditorTheme}
10111016
keybindings={{ search: true }}

src/spicedb-common/components/relationshipeditor/customcells.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,13 @@ export function useCustomCells(
256256
// TODO: come up with a way to express this that doesn't require looping.
257257
const drawCell = useCallback<DrawCallback>(
258258
(args) => {
259+
console.log("calling drawCell");
260+
console.log(args);
259261
const { cell } = args;
262+
console.log("cell.kind:", cell.kind);
263+
console.log(cell);
260264
if (cell.kind !== GridCellKind.Custom) return false;
265+
console.log("looping over renderers");
261266
for (const r of renderers) {
262267
if (r.isMatch(cell)) {
263268
// @ts-expect-error typescript can't see that we're looping over something static

0 commit comments

Comments
 (0)