UNPKG

handsontable

Version:

Handsontable is a JavaScript Data Grid available for React, Angular and Vue.

16 lines 496 B
import { isKeyValueObject } from "../../../helpers/object.mjs"; import { arrayToString } from "../../../helpers/array.mjs"; /** * Defines the value being displayed in an multiSelect-typed cells. * * @param {*} value The value to be displayed. * @returns {*} The final value of the cell. */ export function valueGetter(value) { if (Array.isArray(value)) { return arrayToString(value.map(val => { return isKeyValueObject(val) ? val.value : val; }), ', '); } return value; }