All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.js.utils.FormValueDebugger.es.js Maven / Gradle / Ivy

The newest version!
/**
 * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
 * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
 */

import React from 'react';

const PrettyPrintArray = ({value}) => (
	
		{'['}

		{value.map((item, i) => (
			
				{item}

				{i + 1 !== value.length && ', '}
			
		))}

		{']'}
	
);

/**
 * Used for displaying hidden values for easier debugging. This component
 * should only be used during development.
 */
const FormValueDebugger = ({values}) => (
	

Form hidden values for debugging { ' (Only the values from the frontend component. There are others defined in the JSP)' }

{values.map(({name, value}, index) => ( ))}
Name Value
{name} {Array.isArray(value) ? ( ) : ( value )}
); export default FormValueDebugger;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy