Add sections and autocomplete (QDynamicSelect) on bulk-edit

This commit is contained in:
2022-10-12 17:32:29 -05:00
parent 0edc07a1c2
commit 0d16b82ad0
11 changed files with 311 additions and 119 deletions

View File

@ -36,8 +36,14 @@ interface Props
metaData?: QTableMetaData;
widgetMetaDataList?: QWidgetMetaData[];
light?: boolean;
stickyTop?: string;
}
QRecordSidebar.defaultProps = {
light: false,
stickyTop: "100px",
};
interface SidebarEntry
{
iconName: string;
@ -45,7 +51,7 @@ interface SidebarEntry
label: string;
}
function QRecordSidebar({tableSections, widgetMetaDataList, light}: Props): JSX.Element
function QRecordSidebar({tableSections, widgetMetaDataList, light, stickyTop}: Props): JSX.Element
{
/////////////////////////////////////////////////////////
// insert widgets after identity (first) table section //
@ -65,7 +71,7 @@ function QRecordSidebar({tableSections, widgetMetaDataList, light}: Props): JSX.
return (
<Card sx={{borderRadius: ({borders: {borderRadius}}) => borderRadius.lg, position: "sticky", top: "100px"}}>
<Card sx={{borderRadius: ({borders: {borderRadius}}) => borderRadius.lg, position: "sticky", top: stickyTop}}>
<MDBox component="ul" display="flex" flexDirection="column" p={2} m={0} sx={{listStyle: "none"}}>
{
sidebarEntries ? sidebarEntries.map((entry: SidebarEntry, key: number) => (
@ -109,8 +115,4 @@ function QRecordSidebar({tableSections, widgetMetaDataList, light}: Props): JSX.
);
}
QRecordSidebar.defaultProps = {
light: false,
};
export default QRecordSidebar;