You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cell is showing blank in rows data and data is not coming DOM
Expected behavior 🤔
expected behavior is data cell value should not be undefined and rows should show , the screenshot of table that i attached in expected is working in my local but after deployment cell value coming undefined and data is not coming in DOM
data
Steps to reproduce 🕹
Sandbox link:
Steps to reproduce:
Context 🔦
No response
Your Environment 🌎
Build tool: (e.g. Vite 4, Webpack 5)
Device & OS: (e.g. Windows 11 laptop, iPhone 13 iOS15)
Browser: (e.g. Chrome 112, Safari 15.4)
Other details (e.g. 4K resolution, ...)
The text was updated successfully, but these errors were encountered:
Is this the same issue as this one? If it is, maybe we should close this one since it would be better to keep track of only one issue 🙏
If not, is it possible to create an example with our Stackblitz template, please? Unfortunately, at the moment we are unable to reproduce the issue on our end.
Which UI Kit version is this bug for?
v5.x
Latest version
No Hitachi confidential content
Current behavior 😯
import { css, keyframes } from '@emotion/css';
import {
baseDropdownClasses,
HvButton,
HvFilterGroup,
HvFilterGroupProps,
HvFilterGroupValue,
HvInput,
HvPagination,
HvTable,
HvTableBody,
HvTableCell,
HvTableColumnConfig,
HvTableContainer,
HvTableHead,
HvTableHeader,
HvTableRow,
HvTableSection,
HvOverflowTooltip,
HvTypography,
theme,
useHvData,
useHvFilters,
useHvGlobalFilter,
useHvSortBy,
useHvPagination,
} from '@hitachivantara/uikit-react-core';
import { Add, Close, Filters, Delete } from '@hitachivantara/uikit-react-icons';
import { getTimeAndDate } from 'common/configs/utils';
import { useMemo, useRef, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { useNavigate } from 'react-router-dom';
import { isNewWorkflow } from 'Redux/slices/workflowSlice/workflowSlice.selector';
import { CREATE_NEW, DEFAULT_WORKFLOW } from 'shared/constants/constants';
import { setWorkflowById } from '../../../Redux/slices/bpmnSlice/bpmnSlice';
import { setNewWorkflow } from '../../../Redux/slices/workflowSlice/workflowSlice';
import './WorkflowList.css';
const slide = keyframes
0% { max-height: 0; } 100% { max-height: 300px; }
;const classes = {
filtersContainer: css({
display: 'flex',
width: '100%',
backgroundColor: theme.colors.warning_20,
border: '2px solid black',
overflow: 'hidden',
animation:
${slide} 1.5s ease-in-out
,}),
filters: css({
display: 'flex',
width: '100%',
padding: theme.space.xs,
justifyContent: 'space-between',
alignItems: 'center',
}),
gemsContainer: css({
display: 'flex',
width: '100%',
justifyContent: 'flex-start',
padding:
0px ${theme.space.xs}
,flexWrap: 'wrap',
gap: theme.space.xs,
}),
blank_row: css({
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}),
filterHeader: css({
borderColor: 'transparent',
'&:hover': {
borderColor: 'transparent',
backgroundColor: theme.colors.primary_20,
},
'&:focus-visible': {
borderColor: 'transparent',
},
[
&.${baseDropdownClasses.headerOpen}
]: {borderColor: theme.colors.secondary,
'&:hover': {
borderColor: theme.colors.secondary,
},
},
}),
};
const filters: HvFilterGroupProps['filters'] = [
{
id: 'published',
name: 'Published',
data: [
{ id: 'true', name: 'yes' },
{ id: 'false', name: 'No' },
],
},
];
function EmptyRow() {
return (
);
}
function MakeData(initialState: Workflow[]) {
const data = initialState.map((item) => {
return {
...item,
published: item.published ? 'Yes' : 'No',
lastModified: getTimeAndDate(item.lastModified),
};
});
return data;
}
function getColumns() {
return [
{ Header: 'ID', accessor: 'id' },
{ Header: 'Name', accessor: 'name' },
{ Header: 'Description', accessor: 'description', disableSortBy: true },
{ Header: 'Last modified', accessor: 'lastModified' },
{ Header: 'Published', accessor: 'published', disableSortBy: true },
{ Header: 'Action', accessor: 'action', disableSortBy: true },
];
}
interface Workflow {
id: number;
name: string;
description: string;
published: boolean;
lastModified: string;
path: string;
}
interface TableProps {
handleRowClick: (id: number) => void;
workflowData: Workflow[];
}
function WorkflowList({ workflowData, handleRowClick }: TableProps) {
const filterRef = useRef(null);
const [data] = useState(MakeData(workflowData));
const [selectedFilters, setSelectedFilters] = useState();
const navigate = useNavigate();
const dispatch = useDispatch();
const isNewWrkflwValue = useSelector(isNewWorkflow);
const columns: HvTableColumnConfig[] = useMemo(() => {
const cols = getColumns();
}, []);
const handleOnClick = () => {
dispatch(
setWorkflowById({
name: '',
description: '',
id: 0,
published: false,
fileObject: DEFAULT_WORKFLOW,
}),
);
dispatch(setNewWorkflow(!isNewWrkflwValue));
navigate('/author/workflow');
};
const processedFilters = useMemo(
() =>
selectedFilters?.flatMap((categoryArray, idx) =>
categoryArray?.map((value) => ({
category: {
label: filters[idx].name,
id: filters[idx].id,
},
value: {
label: filters[idx].data.find((x) => x.id === value)?.name,
id: value,
},
})),
),
[selectedFilters],
);
const {
getTableProps,
getTableBodyProps,
prepareRow,
headerGroups,
page,
getHvPaginationProps,
state: { pageSize },
setAllFilters,
setGlobalFilter,
} = useHvData(
{ columns, data },
useHvFilters,
useHvGlobalFilter,
useHvSortBy,
useHvPagination,
);
const renderTableRow = (i: number) => {
const row = page[i];
};
const handleFilters = (arrays?: HvFilterGroupValue) => {
setSelectedFilters(arrays);
const newFilters =
arrays
?.map((array, idx) => ({
id: filters[idx].id,
value: array
.map((x) => filters[idx].data.find((i) => i.id === x)?.name)
.filter((v) => v),
}))
.flat() || [];
setAllFilters?.(newFilters);
};
return (
Workflows
<HvTableSection
raisedHeader
title={Workflow Details}
actions={
<>
<HvInput
type="search"
placeholder="Search all columns"
onChange={(_e, v) => setGlobalFilter?.(v)}
/>
<HvFilterGroup
ref={filterRef}
filters={filters}
disablePortal={false}
value={selectedFilters}
onChange={(_event, value) => handleFilters(value)}
aria-label="Filters"
filterContentProps={{
adornment: ,
placeholder: null,
classes: {
header: classes.filterHeader,
},
}}
/>
);
}
export default WorkflowList;
cell is showing blank in rows data and data is not coming DOM
Expected behavior 🤔
expected behavior is data cell value should not be undefined and rows should show , the screenshot of table that i attached in expected is working in my local but after deployment cell value coming undefined and data is not coming in DOM
data
Steps to reproduce 🕹
Sandbox link:
Steps to reproduce:
Context 🔦
No response
Your Environment 🌎
Build tool: (e.g. Vite 4, Webpack 5)
Device & OS: (e.g. Windows 11 laptop, iPhone 13 iOS15)
Browser: (e.g. Chrome 112, Safari 15.4)
Other details (e.g. 4K resolution, ...)
The text was updated successfully, but these errors were encountered: