META-INF.resources.js.utils.FormValueDebugger.es.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of com.liferay.portal.search.tuning.rankings.web
Show all versions of com.liferay.portal.search.tuning.rankings.web
Liferay Portal Search Tuning Rankings Web
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)'
}
Name
Value
{values.map(({name, value}, index) => (
{name}
{Array.isArray(value) ? (
) : (
value
)}
))}
);
export default FormValueDebugger;