Skip to content

Commit

Permalink
Merge branch 'main' into skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
ecanchev-jaspersoft committed Nov 6, 2024
2 parents c4c4744 + 88cc7e6 commit 96e682a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/jv-scheduler/src/utils/configurationUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ export const getSchedulerData = async (scheduleConfig: any) => {
return { error };
}

const tabsConfig = tabsOrder.length > 0 ? tabsOrder : tabsDefaultOrder;
const tabsConfig = tabsOrder?.length > 0 ? tabsOrder : tabsDefaultOrder;
const stepsToShow: any[] = [],
tabsToShow: any[] = [];
type TabKeys = "parameters" | "schedule" | "output" | "notifications";
Expand Down
33 changes: 21 additions & 12 deletions packages/jv-ui-components/material-ui/MultiSelect/MultiSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import {
ListItemText as MuiListItemText,
OutlinedInput as MuiOutlinedInput,
Select as MuiSelect,
MenuItem as MuiMenuItem,
} from "@mui/material";
import { SelectItem } from "../MenuItem/SelectItem";

export const MultiSelect = forwardRef((props: any, ref) => {
const { value, selected, id, label, className, error, state, ...otherProps } =
Expand All @@ -25,14 +25,23 @@ export const MultiSelect = forwardRef((props: any, ref) => {

const makeOption = (opt: any): JSX.Element => {
return (
<SelectItem key={opt.value} id={opt.value} value={opt.value}>
<MuiMenuItem
key={opt.value}
id={opt.value}
value={opt.value}
className="jv-mChecklist-item mui"
>
<MuiCheckbox
checked={
value.indexOf(opt.value) > -1 || value.indexOf(opt.label) > -1
}
className="jv-mInput-checkbox-check mui"
/>
<MuiListItemText
className="jv-mInput-checkbox-label mui"
primary={opt.label}
/>
<MuiListItemText primary={opt.label} />
</SelectItem>
</MuiMenuItem>
);
};

Expand All @@ -58,21 +67,21 @@ export const MultiSelect = forwardRef((props: any, ref) => {
renderValue={(value: any[]) => value.join(", ")}
id={id}
labelId={id + "_label"}
className={className + " jv-mInput-select jv-mInput-text mui"}
className={className + " jv-mInput-select mui"}
multiple
variant="outlined"
input={<MuiOutlinedInput label="Tag" />}
slotProps={{
elevation: 4,
style: {
maxHeight: ITEM_HEIGHT * 4.5 + ITEM_PADDING_TOP,
width: 250,
},
}}
MenuProps={{
classes: {
list: "jv-mChecklist jv-mChecklistLarge mui",
},
slotProps: {
elevation: 4,
style: {
maxHeight: ITEM_HEIGHT * 4.5 + ITEM_PADDING_TOP,
width: 250,
},
},
}}
>
{makeOptions()}
Expand Down

0 comments on commit 96e682a

Please sign in to comment.