grep-components 2.11.0 → 2.12.0-GREPF-2676.2
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { SelectProps, InputBaseComponentProps } from '@mui/material';
|
|
2
|
+
import { SelectProps, InputBaseComponentProps, InputLabelProps } from '@mui/material';
|
|
3
3
|
export interface SelectItem {
|
|
4
4
|
value: string | number;
|
|
5
5
|
label?: string;
|
|
@@ -14,6 +14,7 @@ export type GrepSelectProps = SelectProps & {
|
|
|
14
14
|
selectItems: SelectItem[];
|
|
15
15
|
unselectOption?: boolean;
|
|
16
16
|
useCheckedSelect?: boolean;
|
|
17
|
+
labelProps?: InputLabelProps;
|
|
17
18
|
inputProps?: InputBaseComponentProps | undefined;
|
|
18
19
|
};
|
|
19
20
|
declare const _default: React.ComponentType<GrepSelectProps>;
|
package/dist/index.js
CHANGED
|
@@ -2551,14 +2551,14 @@ const GrepSelect = (props) => {
|
|
|
2551
2551
|
React.useEffect(() => {
|
|
2552
2552
|
setLabelWidth(inputLabel.current.offsetWidth);
|
|
2553
2553
|
}, []);
|
|
2554
|
-
const { unselectOption = true, errorMessage, selectItems, helperText, fullWidth, outlined, disabled, required, label, inputProps, value, size, id, useCheckedSelect, ...rest } = props;
|
|
2554
|
+
const { unselectOption = true, errorMessage, selectItems, helperText, fullWidth, outlined, disabled, required, label, labelProps, inputProps, value, size, id, useCheckedSelect, ...rest } = props;
|
|
2555
2555
|
const error = errorMessage ? errorMessage.length > 0 : false;
|
|
2556
2556
|
const selected = value;
|
|
2557
2557
|
return (React.createElement(FormControl, { variant: outlined ? 'outlined' : 'standard', className: props.className, fullWidth: fullWidth, required: required, style: props.style, error: error, size: size, disabled: disabled },
|
|
2558
2558
|
React.createElement(InputLabel, { htmlFor: id, ref: inputLabel, style: {
|
|
2559
2559
|
minWidth: 'max-content',
|
|
2560
2560
|
overflow: 'visible',
|
|
2561
|
-
} }, label),
|
|
2561
|
+
}, ...labelProps }, label),
|
|
2562
2562
|
React.createElement(Select, { ...rest, inputProps: { id, ...inputProps }, disabled: !selectItems || disabled, value: value === null ? '' : value, style: { minWidth: labelWidth + (outlined ? 35 : 25) },
|
|
2563
2563
|
// @todo: make input respect label length
|
|
2564
2564
|
input: outlined ? React.createElement(OutlinedInput, { label: label }) : React.createElement(Input, null), MenuProps: {
|
|
@@ -11024,7 +11024,8 @@ function SortableTableRow({ item, id, index, render, disabled, }) {
|
|
|
11024
11024
|
const renderRow = useCallback$1((isDragging) => cells.map(({ value, properties }, index) => (React__default.createElement(SortableTableCell, { key: `dragable-${id}-${index}`, locked: isDragging, ...properties }, value))), [cells, id]);
|
|
11025
11025
|
return (React__default.createElement(PublicDraggable, { draggableId: `dragable-${id}`, index: index, isDragDisabled: disabled }, (provided, { isDragging }) => {
|
|
11026
11026
|
const { classes } = useStyles$4({ isDragging: isDragging });
|
|
11027
|
-
return (React__default.createElement(TableRow, { className: classes.row, ref: provided.innerRef, ...provided.draggableProps
|
|
11027
|
+
return (React__default.createElement(TableRow, { className: classes.row, ref: provided.innerRef, ...provided.draggableProps, ...provided.dragHandleProps, role: "row" // defined specifically to override this prop from provided.draghandleProps
|
|
11028
|
+
, tabIndex: undefined },
|
|
11028
11029
|
React__default.createElement(TableCell, { style: { width: '45px', padding: '5px 10px' }, ...provided.dragHandleProps },
|
|
11029
11030
|
React__default.createElement(DragIndicator, null)),
|
|
11030
11031
|
renderRow(isDragging)));
|