perf: Limiting the suggested binding to fix performance issue (#6877)

pull/6195/head^2
Rahul 2 years ago committed by GitHub
parent 2b14a5c233
commit c29f19a88b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -7379,6 +7379,9 @@ class App extends React.Component<AppProps, AppState> {
private maybeSuggestBindingForAll(
selectedElements: NonDeleted<ExcalidrawElement>[],
): void {
if (selectedElements.length > 50) {
return;
}
const suggestedBindings = getEligibleElementsForBinding(selectedElements);
this.setState({ suggestedBindings });
}

Loading…
Cancel
Save