How to use the react-data-grid-addons.Formatters function in react-data-grid-addons

To help you get started, we’ve selected a few react-data-grid-addons 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 DefinitelyTyped / DefinitelyTyped / types / react-data-grid / v2 / react-data-grid-tests.tsx View on Github external
];

var titles = ['Dr.', 'Mr.', 'Mrs.', 'Miss', 'Ms.'];

var columns:ReactDataGrid.Column[] = [
    {
        key: 'id',
        name: 'ID',
        width: 80,
        resizable: true
    },
    {
        key: 'avartar',
        name: 'Avartar',
        width: 60,
        formatter: ReactDataGridPlugins.Formatters.ImageFormatter,
        resizable: true,
        headerRenderer: 
    },
    {
        key: 'county',
        name: 'County',
        editor: ,
        width: 200,
        resizable: true,
        getRowMetaData: (rowdata: any, column: ReactDataGrid.Column) => {
            return {};
        }
    },
    {
        key: 'title',
        name: 'Title',
github DefinitelyTyped / DefinitelyTyped / types / react-data-grid / react-data-grid-tests.tsx View on Github external
];

var titles = ['Dr.', 'Mr.', 'Mrs.', 'Miss', 'Ms.'];

var columns:ReactDataGrid.Column[] = [
    {
        key: 'id',
        name: 'ID',
        width: 80,
        resizable: true
    },
    {
        key: 'avartar',
        name: 'Avartar',
        width: 60,
        formatter: ReactDataGridPlugins.Formatters.ImageFormatter,
        resizable: true,
        headerRenderer: 
    },
    {
        key: 'county',
        name: 'County',
        editor: ,
        width: 200,
        resizable: true,
        getRowMetaData: (rowdata: any, column: ReactDataGrid.Column) => {
            return {};
        }
    },
    {
        key: 'title',
        name: 'Title',
github oknosoft / metadata.js / packages / metadata-react-ui / plugin.js View on Github external
var _DataField = require("metadata-react-ui/DataField");

var _reactDataGridAddons = require("react-data-grid-addons");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

const AutoCompleteEditor = _reactDataGridAddons.Editors.AutoComplete; /**
                                                                       * ### модификатор метод columns() справочника scheme_settings - добавляет форматтеры и редакторы
                                                                       *
                                                                       * @module rx_columns
                                                                       *
                                                                       * Created 10.01.2017
                                                                       */

const DropDownEditor = _reactDataGridAddons.Editors.DropDownEditor;
const DropDownFormatter = _reactDataGridAddons.Formatters.DropDownFormatter;

function rx_columns($p) {

  const { moment } = $p.utils;

  const date_formatter = {
    date: v => {
      const { presentation } = moment(v).format(moment._masks.date);
      return _react2.default.createElement(
        "div",
        { title: presentation },
        presentation
      );
    },
    date_time: v => {
      const { presentation } = moment(v).format(moment._masks.date_time);