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

[dev] AB#102323 [Finance > COA > Edit Sub Account] - User can Edit the "Sub Account's" segments code numbers, in the "Edit Sub Account" drawer. #465

Merged
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
16 changes: 16 additions & 0 deletions src/inputs/selectNext/selectNext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ type PropTypes = {
*/
className?: string;
/**
* A Select can be disabled
*/
disabled?: boolean,
/**
* Supply dropdown menu maximum height
*/
dropdownMenuMaxHeight?: number;
Expand Down Expand Up @@ -99,6 +103,7 @@ type PropTypes = {
const defaultProps = {
alwaysShowRequiredIndicator: false,
className: null,
disabled: false,
dropdownMenuMaxHeight: 180,
dropdownMenuMinHeight: null,
id: null,
Expand All @@ -125,6 +130,7 @@ const useStyles = makeStyles((theme) => {

// Control Options
const selectInputBg = p.background.primary;
const selectInputBgDisabled = p.background.secondary;
const selectInputBgFocus = p.background.contrastPrimary;
const selectInputBorderColor = p.border.primary;
const selectInputBorderRadius = '3px';
Expand Down Expand Up @@ -194,6 +200,12 @@ const useStyles = makeStyles((theme) => {
fill: `${selectInputArrowColorFocus} !important`,
},
},
'&--is-disabled': {
backgroundColor: selectInputBgDisabled,
'&:hover': {
boxShadow: 'none',
},
},
'&--is-focused:not(.react_select__control--menu-is-open)': {
borderColor: `${selectInputBorderFocus} ${selectInputBorderFocus} ${selectInputBorderFocus}`,
boxShadow: [
Expand Down Expand Up @@ -343,6 +355,7 @@ const CustomOption = (componentProps) => {
const {
children,
className,
disabled,
innerRef,
isSelected,
selectOption,
Expand All @@ -358,6 +371,7 @@ const CustomOption = (componentProps) => {
{...componentProps}
aria-selected={isSelected}
className={optionClass}
isDisabled={disabled}
selectOption={selectOption}
ref={innerRef}
tabIndex={0}
Expand All @@ -383,6 +397,7 @@ const SelectNext = React.forwardRef(function SelectNext(
const {
alwaysShowRequiredIndicator,
className,
disabled,
dropdownMenuMaxHeight,
dropdownMenuMinHeight,
id,
Expand Down Expand Up @@ -450,6 +465,7 @@ const SelectNext = React.forwardRef(function SelectNext(
// @ts-ignore
dropdownMenuMaxHeight={dropdownMenuMaxHeight}
dropdownMenuMinHeight={dropdownMenuMinHeight}
isDisabled={disabled}
isSearchable={isSearchable}
menuPortalTarget={menuPortalTarget}
name={name}
Expand Down
Loading