MCPcopy Create free account
hub / github.com/microsoft/SandDance / getRows

Function getRows

docs/app/js/sanddance-app.js:10983–11016  ·  view source on GitHub ↗
(item, options)

Source from the content-addressed store, hash-verified

10981 }
10982}
10983function getRows(item, options) {
10984 const rows = [];
10985 for(let columnName in item){
10986 if (columnName === (0, _constants.GL_ORDINAL)) continue;
10987 if ((0, _util.isInternalFieldName)(columnName)) continue;
10988 if (options && options.exclude) {
10989 if (options.exclude(columnName)) continue;
10990 }
10991 let value = item[columnName];
10992 let content;
10993 if (options && options.displayValue) content = options.displayValue(value);
10994 else switch(value){
10995 case null:
10996 content = _vegaDeckGl.util.createElement("i", null, "null");
10997 break;
10998 case undefined:
10999 content = _vegaDeckGl.util.createElement("i", null, "undefined");
11000 break;
11001 default:
11002 content = value.toString();
11003 }
11004 rows.push({
11005 cells: [
11006 {
11007 content: columnName + ":"
11008 },
11009 {
11010 content
11011 }
11012 ]
11013 });
11014 }
11015 return rows;
11016}
11017const renderTooltip = (props)=>{
11018 return props.rows.length === 0 ? null : _vegaDeckGl.util.createElement("div", {
11019 className: `${props.cssPrefix}tooltip`

Callers 1

constructorMethod · 0.70

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected