Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/skeleton' into skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
aleeg-jaspersoft committed Nov 8, 2024
2 parents 76453f9 + 96e682a commit 8605e63
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 15 deletions.
3 changes: 1 addition & 2 deletions packages/jv-scheduler/src/components/Tabs/Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/

import React, { ChangeEvent } from "react";
import "@jaspersoft/jv-ui-components/dist/jv-ui.css";
import { JVTabs, JVTab } from "@jaspersoft/jv-ui-components";
import Schedule from "../Tabs/TabsContent/Schedule";
import Parameters from "../Tabs/TabsContent/Parameters";
Expand All @@ -15,7 +14,7 @@ import {
currentTabValidationError,
setCurrentActiveTab,
setVisitedTab,
} from "./../../actions/action";
} from "../../actions/action";
import { useDispatch, useSelector } from "react-redux";
import {
NOTIFICATIONS_TAB,
Expand Down
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 8605e63

Please sign in to comment.