@patternfly/react-table 5.0.0-alpha.94 → 5.0.0-alpha.96

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.
Files changed (33) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/components/package.json +1 -1
  3. package/deprecated/package.json +1 -1
  4. package/dist/esm/components/Table/EditableSelectInputCell.d.ts +2 -2
  5. package/dist/esm/components/Table/EditableSelectInputCell.d.ts.map +1 -1
  6. package/dist/esm/components/Table/EditableSelectInputCell.js +2 -2
  7. package/dist/esm/components/Table/EditableSelectInputCell.js.map +1 -1
  8. package/dist/esm/components/Table/EditableTextCell.js +1 -1
  9. package/dist/esm/components/Table/EditableTextCell.js.map +1 -1
  10. package/dist/js/components/Table/EditableSelectInputCell.d.ts +2 -2
  11. package/dist/js/components/Table/EditableSelectInputCell.d.ts.map +1 -1
  12. package/dist/js/components/Table/EditableSelectInputCell.js +2 -2
  13. package/dist/js/components/Table/EditableSelectInputCell.js.map +1 -1
  14. package/dist/js/components/Table/EditableTextCell.js +1 -1
  15. package/dist/js/components/Table/EditableTextCell.js.map +1 -1
  16. package/dist/js/components/Table/package.json +1 -1
  17. package/dist/js/components/Table/utils/decorators/package.json +1 -1
  18. package/dist/js/components/Table/utils/package.json +1 -1
  19. package/dist/js/components/package.json +1 -1
  20. package/dist/js/deprecated/components/Table/base/package.json +1 -1
  21. package/dist/js/deprecated/components/Table/package.json +1 -1
  22. package/dist/js/deprecated/components/package.json +1 -1
  23. package/dist/js/deprecated/package.json +1 -1
  24. package/dist/js/package.json +1 -1
  25. package/dist/umd/react-table.min.js +1 -1
  26. package/package.json +3 -3
  27. package/src/components/Table/EditableSelectInputCell.tsx +4 -4
  28. package/src/components/Table/EditableTextCell.tsx +1 -1
  29. package/src/components/Table/examples/TableActions.tsx +1 -1
  30. package/src/components/Table/examples/TableBasic.tsx +1 -1
  31. package/src/deprecated/components/Table/examples/LegacyTableActions.tsx +1 -1
  32. package/src/deprecated/components/Table/examples/LegacyTableBasic.tsx +1 -1
  33. package/src/deprecated/components/Table/examples/Table.md +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-table",
3
- "version": "5.0.0-alpha.94",
3
+ "version": "5.0.0-alpha.96",
4
4
  "description": "This library provides a set of React table components for use with the PatternFly 4",
5
5
  "main": "dist/js/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -40,7 +40,7 @@
40
40
  "subpaths": "node scripts/createSubpaths.js"
41
41
  },
42
42
  "dependencies": {
43
- "@patternfly/react-core": "^5.0.0-alpha.92",
43
+ "@patternfly/react-core": "^5.0.0-alpha.94",
44
44
  "@patternfly/react-icons": "^5.0.0-alpha.14",
45
45
  "@patternfly/react-styles": "^5.0.0-alpha.10",
46
46
  "@patternfly/react-tokens": "^5.0.0-alpha.9",
@@ -55,5 +55,5 @@
55
55
  "react": "^17 || ^18",
56
56
  "react-dom": "^17 || ^18"
57
57
  },
58
- "gitHead": "887e5bc7e32dfb539c2006177eafcbafe12bb3d2"
58
+ "gitHead": "4f593bd8942e59802d2d8e04b776a112c51d2304"
59
59
  }
@@ -17,8 +17,8 @@ export interface IEditableSelectInputCell extends Omit<React.HTMLProps<HTMLEleme
17
17
  props: EditableSelectInputProps;
18
18
  /** Event handler which fires when user selects an option in this cell */
19
19
  onSelect: (
20
- newValue: string | SelectOptionObject,
21
20
  event: React.MouseEvent | React.ChangeEvent,
21
+ newValue: string | SelectOptionObject,
22
22
  rowIndex: number,
23
23
  cellIndex: number,
24
24
  isPlaceholder?: boolean
@@ -34,7 +34,7 @@ export interface IEditableSelectInputCell extends Omit<React.HTMLProps<HTMLEleme
34
34
  /** Event handler which fires when the select toggle is toggled */
35
35
  onToggle?: (event: React.MouseEvent | React.ChangeEvent | React.KeyboardEvent | Event, isExpanded: boolean) => void;
36
36
  /** Event handler which fires when the user clears the selections */
37
- clearSelection?: (rowIndex: number, cellIndex: number, event?: React.MouseEvent) => void;
37
+ clearSelection?: (event: React.MouseEvent, rowIndex: number, cellIndex: number) => void;
38
38
  }
39
39
 
40
40
  export const EditableSelectInputCell: React.FunctionComponent<IEditableSelectInputCell> = ({
@@ -54,11 +54,11 @@ export const EditableSelectInputCell: React.FunctionComponent<IEditableSelectInp
54
54
  newValue: string | SelectOptionObject,
55
55
  isPlaceholder: boolean
56
56
  ) => {
57
- onSelect(newValue, event, rowIndex, cellIndex, isPlaceholder);
57
+ onSelect(event, newValue, rowIndex, cellIndex, isPlaceholder);
58
58
  };
59
59
 
60
60
  const onClear = (event: React.MouseEvent) => {
61
- clearSelection(rowIndex, cellIndex, event);
61
+ clearSelection(event, rowIndex, cellIndex);
62
62
  };
63
63
 
64
64
  const select = (
@@ -44,7 +44,7 @@ export const EditableTextCell: React.FunctionComponent<IEditableTextCell> = ({
44
44
  value={props.editableValue !== undefined ? props.editableValue : value}
45
45
  validated={props.isValid !== false ? 'default' : 'error'}
46
46
  type="text"
47
- onChange={(newValue, event) => {
47
+ onChange={(event, newValue) => {
48
48
  handleTextInputChange(newValue, event, rowIndex, cellIndex);
49
49
  }}
50
50
  aria-label={inputAriaLabel}
@@ -46,7 +46,7 @@ export const TableActions: React.FunctionComponent = () => {
46
46
 
47
47
  // This state is just for the ToggleGroup in this example and isn't necessary for Table usage.
48
48
  const [exampleChoice, setExampleChoice] = React.useState<ExampleType>('defaultToggle');
49
- const onExampleTypeChange: ToggleGroupItemProps['onChange'] = (_isSelected, event) => {
49
+ const onExampleTypeChange: ToggleGroupItemProps['onChange'] = (event, _isSelected) => {
50
50
  const id = event.currentTarget.id;
51
51
  setExampleChoice(id as ExampleType);
52
52
  };
@@ -30,7 +30,7 @@ export const TableBasic: React.FunctionComponent = () => {
30
30
 
31
31
  // This state is just for the ToggleGroup in this example and isn't necessary for Table usage.
32
32
  const [exampleChoice, setExampleChoice] = React.useState<ExampleType>('default');
33
- const onExampleTypeChange: ToggleGroupItemProps['onChange'] = (_isSelected, event) => {
33
+ const onExampleTypeChange: ToggleGroupItemProps['onChange'] = (event, _isSelected) => {
34
34
  const id = event.currentTarget.id;
35
35
  setExampleChoice(id as ExampleType);
36
36
  };
@@ -56,7 +56,7 @@ export const LegacyTableActions: React.FunctionComponent = () => {
56
56
 
57
57
  // This state is just for the ToggleGroup in this example and isn't necessary for Table usage.
58
58
  const [propToUse, setPropToUse] = React.useState<ExampleType>('actions');
59
- const onPropToUseChange: ToggleGroupItemProps['onChange'] = (_isSelected, event) => {
59
+ const onPropToUseChange: ToggleGroupItemProps['onChange'] = (event, _isSelected) => {
60
60
  const id = event.currentTarget.id;
61
61
  setPropToUse(id as ExampleType);
62
62
  };
@@ -39,7 +39,7 @@ export const LegacyTableBasic: React.FunctionComponent = () => {
39
39
 
40
40
  // This state is just for the ToggleGroup in this example and isn't necessary for table usage.
41
41
  const [exampleChoice, setExampleChoice] = React.useState<ExampleType>('default');
42
- const onExampleTypeChange: ToggleGroupItemProps['onChange'] = (_isSelected, event) => {
42
+ const onExampleTypeChange: ToggleGroupItemProps['onChange'] = (event, _isSelected) => {
43
43
  const id = event.currentTarget.id;
44
44
  setExampleChoice(id as ExampleType);
45
45
  };
@@ -679,7 +679,7 @@ class EditableRowsTable extends React.Component {
679
679
  });
680
680
  };
681
681
 
682
- this.onSelect = (newValue, evt, rowIndex, cellIndex, isPlaceholder) => {
682
+ this.onSelect = (_event, newValue, rowIndex, cellIndex, isPlaceholder) => {
683
683
  const newRows = Array.from(this.state.rows);
684
684
  const newCellProps = newRows[rowIndex].cells[cellIndex].props;
685
685
 
@@ -720,7 +720,7 @@ class EditableRowsTable extends React.Component {
720
720
  });
721
721
  };
722
722
 
723
- this.clearSelection = (rowIndex, cellIndex) => {
723
+ this.clearSelection = (_event, rowIndex, cellIndex) => {
724
724
  const newRows = Array.from(this.state.rows);
725
725
  const newCellProps = newRows[rowIndex].cells[cellIndex].props;
726
726
  newCellProps.editableValue = [];