Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/components/relationshipeditor/RelationshipEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
// NOTE: we do not want to rerun this if the dataUpdated callback has changed (which it should
// not, ideally).
// TODO: dataUpdated is currently changing on every render because the debouncer isn't memoized.
}, [data]);

Check warning on line 177 in src/components/relationshipeditor/RelationshipEditor.tsx

View workflow job for this annotation

GitHub Actions / Run Linters and Typechecking

React Hook useEffect has a missing dependency: 'dataUpdated'. Either include it or remove the dependency array. If 'dataUpdated' changes too often, find the parent component that defines it and wrap that definition in useCallback

// relationships holds a filtered form of the grid, containing only valid relationships.
const relationships = useDeepCompareMemo(() => {
Expand Down Expand Up @@ -601,8 +601,7 @@
return false;
}

const [oneIndexedColumn, startingRow] = target;
const startingCol = oneIndexedColumn - 1; // col is +1 for the checkbox.
const [startingCol, startingRow] = target;

let adjustedData = inFlightData.current;
let rowOffset = 0;
Expand Down
7 changes: 3 additions & 4 deletions src/components/relationshipeditor/columns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ export const COLUMNS: Column[] = [
group: "Resource",
dataKind: DataKind.RESOURCE_TYPE,
section: RelationshipSection.RESOURCE,
trailingRowOptions: {
hint: "Add relationship",
},
dataDescription: "definition name",
},
{
Expand All @@ -116,10 +119,6 @@ export const COLUMNS: Column[] = [
group: "Resource",
dataKind: DataKind.RESOURCE_ID,
section: RelationshipSection.RESOURCE,
trailingRowOptions: {
hint: "Add relationship",
targetColumn: 0,
},
dataDescription: "object ID",
},
{
Expand Down
Loading