MCPcopy Create free account
hub / github.com/apitable/apitable / cellValueToArray

Method cellValueToArray

packages/core/src/model/field/link_field.ts:327–335  ·  view source on GitHub ↗

* Obtains the content of the first column in the associated table through the `recordId` recorded in the associated field cell, * and the content is processed by cellValue2String. * @param {(string[] | null)} recordIds * @returns {(string[] | null)}

(recordIds: string[] | null)

Source from the content-addressed store, hash-verified

325 * @returns {(string[] | null)}
326 */
327 cellValueToArray(recordIds: string[] | null): string[] | null {
328 if (!this.validate(recordIds)) {
329 return null;
330 }
331 const valueArray = recordIds.map(recordId => {
332 return this.getLinkedRecordCellString(recordId) || t(Strings.record_unnamed);
333 });
334 return valueArray;
335 }
336
337 /**
338 * @description concatenates the strings obtained by recordId.

Callers 5

cellValueToStringMethod · 0.95
getComputeCellValueFunction · 0.45
cellValueToStringFunction · 0.45
cellValueToStdValueFunction · 0.45
resolverWrapperFunction · 0.45

Calls 4

validateMethod · 0.95
tFunction · 0.90
mapMethod · 0.45

Tested by

no test coverage detected