How to use the conseiljs.AttrbuteDataType.STRING function in conseiljs

To help you get started, we’ve selected a few conseiljs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Cryptonomic / Arronax / src / utils / render.tsx View on Github external
);
      } else if (dataType === AttrbuteDataType.HASH) {
          const hash = formatReferenceValue(attribute, (truncate ? truncateHash(value) : value), value, onClickPrimaryKey);
          return (
              
              {hash}
              
                  
              
              
          );
      } else if (dataType === AttrbuteDataType.DECIMAL || dataType === AttrbuteDataType.INT || dataType === AttrbuteDataType.CURRENCY) {
        return formatNumber(Number(value), attribute, truncate);
      } else if (dataType === AttrbuteDataType.STRING && value.length > 100) {
          return (
              
              {value.substring(0, 100)}
              
                  
              
              
          );
      } else if (dataType === AttrbuteDataType.STRING && value.length > 0 && attribute.cardinality && attribute.cardinality < 20) {
          return value.split('_').map(s => s.charAt(0).toUpperCase() + s.slice(1)).join(' ');
      } else {
          return formatReferenceValue(attribute, value, value, onClickPrimaryKey);
      }
  };
github Cryptonomic / Arronax / src / components / CustomTableRow / index.tsx View on Github external
);
    } else if (dataType === AttrbuteDataType.HASH) {
        return (
            
            {formatReferenceValue(attribute, truncateHash(value), value, onClickPrimaryKey)}
            
                
            
            
        );
    } else if (dataType === AttrbuteDataType.DECIMAL || dataType === AttrbuteDataType.INT || dataType === AttrbuteDataType.CURRENCY) {
        return formatNumber(Number(value), attribute);
    } else if (dataType === AttrbuteDataType.STRING && value.length > 100) {
        return (
            
            {value.substring(0, 100)}
            
                
            
            
        );
    } else if (dataType === AttrbuteDataType.STRING && value.length > 0 && attribute.cardinality && attribute.cardinality < 20) {
        return value.split('_').map(s => s.charAt(0).toUpperCase() + s.slice(1)).join(' ');
    } else {
        return formatReferenceValue(attribute, value, value, onClickPrimaryKey);
    }
};
github Cryptonomic / Arronax / src / utils / render.tsx View on Github external
);
      } else if (dataType === AttrbuteDataType.DECIMAL || dataType === AttrbuteDataType.INT || dataType === AttrbuteDataType.CURRENCY) {
        return formatNumber(Number(value), attribute, truncate);
      } else if (dataType === AttrbuteDataType.STRING && value.length > 100) {
          return (
              
              {value.substring(0, 100)}
              
                  
              
              
          );
      } else if (dataType === AttrbuteDataType.STRING && value.length > 0 && attribute.cardinality && attribute.cardinality < 20) {
          return value.split('_').map(s => s.charAt(0).toUpperCase() + s.slice(1)).join(' ');
      } else {
          return formatReferenceValue(attribute, value, value, onClickPrimaryKey);
      }
  };
github Cryptonomic / Arronax / src / components / CustomTableRow / index.tsx View on Github external
);
    } else if (dataType === AttrbuteDataType.DECIMAL || dataType === AttrbuteDataType.INT || dataType === AttrbuteDataType.CURRENCY) {
        return formatNumber(Number(value), attribute);
    } else if (dataType === AttrbuteDataType.STRING && value.length > 100) {
        return (
            
            {value.substring(0, 100)}
            
                
            
            
        );
    } else if (dataType === AttrbuteDataType.STRING && value.length > 0 && attribute.cardinality && attribute.cardinality < 20) {
        return value.split('_').map(s => s.charAt(0).toUpperCase() + s.slice(1)).join(' ');
    } else {
        return formatReferenceValue(attribute, value, value, onClickPrimaryKey);
    }
};