bug fixed : selecting badge is breaking the table (#4416)

This commit is contained in:
Manish Kushare 2022-10-19 07:44:03 +05:30 committed by GitHub
parent 346308b6e4
commit 325e44cbdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,7 +7,9 @@ export const CustomSelect = ({ options, value, multiple, onChange, darkMode }) =
function renderValue(valueProps) {
if (valueProps) {
return valueProps.value.split(', ').map((value, index) => (
const stringifyValue = String(valueProps.value);
const arrayOfValueProps = stringifyValue.includes(',') ? stringifyValue.split(', ') : stringifyValue.split(' ');
return arrayOfValueProps.map((value, index) => (
<span key={index} {...valueProps} className="badge bg-blue-lt p-2 mx-1">
{value}
</span>