mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-10 07:26:01 -06:00
Fix select dropdown border issue. #5661
This commit is contained in:
parent
1c705cf9be
commit
42220b1cb2
@ -774,6 +774,16 @@ OptionView.propTypes = {
|
|||||||
label: PropTypes.string,
|
label: PropTypes.string,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function CustomSelectInput(props) {
|
||||||
|
const { maxLength } = props.selectProps;
|
||||||
|
return (
|
||||||
|
<RSComponents.Input {...props} maxLength={maxLength} />
|
||||||
|
);
|
||||||
|
}
|
||||||
|
CustomSelectInput.propTypes = {
|
||||||
|
selectProps: PropTypes.object,
|
||||||
|
};
|
||||||
|
|
||||||
function CustomSelectOption(props) {
|
function CustomSelectOption(props) {
|
||||||
return (
|
return (
|
||||||
<RSComponents.Option {...props}>
|
<RSComponents.Option {...props}>
|
||||||
@ -918,9 +928,9 @@ export const InputSelect = forwardRef(({
|
|||||||
components: {
|
components: {
|
||||||
Option: CustomSelectOption,
|
Option: CustomSelectOption,
|
||||||
SingleValue: CustomSelectSingleValue,
|
SingleValue: CustomSelectSingleValue,
|
||||||
IndicatorSeparator: (props) => controlProps.noDropdown ? null: <RSComponents.IndicatorSeparator {...props} />,
|
IndicatorSeparator: controlProps.noDropdown ? null: RSComponents.IndicatorSeparator,
|
||||||
DropdownIndicator: (props) => controlProps.noDropdown ? null: <RSComponents.DropdownIndicator {...props} />,
|
DropdownIndicator: controlProps.noDropdown ? null: RSComponents.DropdownIndicator,
|
||||||
Input: props => <RSComponents.Input {...props} maxLength={controlProps.maxLength} />
|
Input: CustomSelectInput,
|
||||||
},
|
},
|
||||||
isMulti: Boolean(controlProps.multiple),
|
isMulti: Boolean(controlProps.multiple),
|
||||||
openMenuOnClick: !readonly,
|
openMenuOnClick: !readonly,
|
||||||
@ -932,6 +942,7 @@ export const InputSelect = forwardRef(({
|
|||||||
styles: styles,
|
styles: styles,
|
||||||
inputId: cid,
|
inputId: cid,
|
||||||
placeholder: (readonly || disabled) ? '' : controlProps.placeholder || gettext('Select an item...'),
|
placeholder: (readonly || disabled) ? '' : controlProps.placeholder || gettext('Select an item...'),
|
||||||
|
maxLength: controlProps.maxLength,
|
||||||
...otherProps,
|
...otherProps,
|
||||||
...props,
|
...props,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user