Search all fields by default, gray out nodes if no match

This commit is contained in:
David Kaltschmidt
2016-05-03 15:58:09 +02:00
parent 8669266f25
commit 3ee802a516
6 changed files with 73 additions and 66 deletions

View File

@@ -64,3 +64,8 @@ function makeFormatMetric(renderFn) {
export const formatMetric = makeFormatMetric(renderHtml);
export const formatMetricSvg = makeFormatMetric(renderSvg);
export const formatDate = d3.time.format.iso;
const CLEAN_LABEL_REGEX = /\W/g;
export function slugify(label) {
return label.replace(CLEAN_LABEL_REGEX, '');
}