pcm-shared-components 0.0.98 → 0.0.101

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -220,9 +220,10 @@ export const GenericAppBar = props => {
220
220
  }), menu.displayDivider ? menu_divider : /*#__PURE__*/React.createElement("div", {
221
221
  className: ""
222
222
  })) : /*#__PURE__*/React.createElement("div", {
223
+ className: "h-full my-auto",
223
224
  key: `main_menu_item_${idx}`
224
225
  }, /*#__PURE__*/React.createElement("div", {
225
- className: "flex flex-row",
226
+ className: "flex flex-row h-full m-auto",
226
227
  key: `main_sub_items_${new Date()}`
227
228
  }, /*#__PURE__*/React.createElement(Tooltip, {
228
229
  title: menu.name
@@ -98,11 +98,13 @@ export const GenericDialogWindow = props => {
98
98
  try {
99
99
  //Loop over all our on click overrides and apply the onClick callback for each id found in the onClickOverride state
100
100
  onClickOverride.forEach(item => {
101
- setManagedAppBarMenu(previousState => {
102
- return { ...previousState,
103
- mainMenu: updateObjectByID(previousState.mainMenu, item.id, item.onClick)
104
- };
105
- });
101
+ if (item && item.id) {
102
+ setManagedAppBarMenu(previousState => {
103
+ return { ...previousState,
104
+ mainMenu: updateObjectByID(previousState.mainMenu, item.id, item.onClick)
105
+ };
106
+ });
107
+ }
106
108
  });
107
109
  } catch (error) {
108
110
  console.error('Error in setMenuOnClickCallback: ', error);
@@ -114,7 +116,7 @@ export const GenericDialogWindow = props => {
114
116
  setOverrides();
115
117
  }, [onClickOverride]);
116
118
  useEffect(() => {
117
- if (appBarMenu && appBarMenu.mainMenu) {
119
+ if (appBarMenu && appBarMenu.mainMenu && appBarMenu.mainMenu.length > 0) {
118
120
  setManagedAppBarMenu({ ...appBarMenu,
119
121
  mainMenu: [...appBarMenu.mainMenu.map(mm => {
120
122
  if (mm.id === 'save') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pcm-shared-components",
3
- "version": "0.0.98",
3
+ "version": "0.0.101",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "babel": {