Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/fp 1293 ldap configuration page - fix click on profile menu not working #64

Merged
merged 6 commits into from
Mar 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .storybook/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ module.exports = function expressMiddleware(router) {

for (let domain in proxyConfig) {
console.log(domain);
router.use(domain, proxy(proxyConfig[domain]));
router.use(domain, proxy.createProxyMiddleware(proxyConfig[domain]));
}
};
5 changes: 1 addition & 4 deletions src/Components/ProfileMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@ const ProfileMenu = props => {
</div>
<Divider variant="middle" />
{props.extraItems?.map(item => (
<MenuItem
className={classes.menuItemSpacing}
onClick={() => item.func}
>
<MenuItem className={classes.menuItemSpacing} onClick={item.func}>
{item.label}
</MenuItem>
))}
Expand Down
8 changes: 7 additions & 1 deletion src/Components/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import MenuItem from "@material-ui/core/MenuItem";
import FormControl from "@material-ui/core/FormControl";
import MaterialSelect from "@material-ui/core/Select";
import PropTypes from "prop-types";
import { Checkbox, ListItemText } from "@material-ui/core";

const useStyles = makeStyles(theme => ({
formControl: {
Expand Down Expand Up @@ -39,12 +40,17 @@ const Select = props => {
value={props.value}
onChange={props.onChange}
inputProps={props.inputProps}
multiple={props.multiple}
renderValue={props.renderValue}
>
{noneOption}
{props.options.map((element, index) => {
return (
<MenuItem key={index} value={element}>
{element}
{props.multiple && (
<Checkbox checked={props.value.indexOf(element) > -1} />
)}
<ListItemText primary={element} />
</MenuItem>
);
})}
Expand Down
11 changes: 6 additions & 5 deletions src/Components/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,15 @@ const tableIcons = {
Search: forwardRef((props, ref) => <Search {...props} ref={ref} />),
SortArrow: forwardRef((props, ref) => <ArrowDownward {...props} ref={ref} />),
ThirdStateCheck: forwardRef((props, ref) => <Remove {...props} ref={ref} />),
ViewColumn: forwardRef((props, ref) => <ViewColumn {...props} ref={ref} />),
ViewColumn: forwardRef((props, ref) => <ViewColumn {...props} ref={ref} />)
};

// More information in: https://material-table.com/#/docs/all-props

const Table = (props) => {
const Table = props => {
return (
<MaterialTable
{...props}
style={props.style}
title={props.title}
columns={props.columns}
Expand All @@ -70,7 +71,7 @@ Table.propTypes = {
actions: PropTypes.array,
options: PropTypes.object,
components: PropTypes.object,
localization: PropTypes.object,
localization: PropTypes.object
};
Table.defaultProps = {
style: {},
Expand All @@ -85,9 +86,9 @@ Table.defaultProps = {
search: false,
toolbar: false,
searchFieldAlignment: "left",
paging: false,
paging: false
},
components: {},
components: {}
};

export default Table;