Skip to content

Instantly share code, notes, and snippets.

@bvaughn
bvaughn / Selectable.jsx
Last active August 27, 2019 17:54 — forked from AlexFrazer/Selectable.jsx
Fork of gist.github.com/AlexFrazer/aed3810407aaf23b23168449a7ef83bf to answer question
import * as React from "react";
import * as rbush from "rbush";
export const SelectableContext = React.createContext();
export class SelectableGroup extends React.PureComponent {
static defaultProps = {
tolerance: 10
};
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>js-search indexing</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>