UNPKG

synapse-react-client

Version:

[![Build Status](https://travis-ci.com/Sage-Bionetworks/Synapse-React-Client.svg?branch=main)](https://travis-ci.com/Sage-Bionetworks/Synapse-React-Client) [![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synaps

16 lines (15 loc) 707 B
import { AjvError } from '@sage-bionetworks/rjsf-core'; /** * Strips null values from arrays in the provided form data. If the array is empty after * removing null values, the key is removed from the form data. * * This allows users to submit forms with empty array fields (SWC-5762) */ export declare function dropNullishArrayValues(formData: Record<string, unknown>): Record<string, unknown>; /** * Inspects the property of the AjvError and modifies it to be comparable to simple key strings, like entity property keys. * @param error * @returns */ export declare function getFriendlyPropertyName(error: AjvError): string; export declare function transformErrors(errors: AjvError[]): AjvError[];