Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions app/client/src/components/ads/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ const SelectedDropDownHolder = styled.div`
display: flex;
align-items: center;
min-width: 0;
width: 100%;
overflow: hidden;

& ${Text} {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ export const CONNECT_NEW_DATASOURCE_OPTION_ID = _.uniqueId();

// ---------- Styles ----------

const OptionWrapper = styled.div<{ disabled?: boolean; selected?: boolean }>`
const OptionWrapper = styled.div<{
disabled?: boolean;
selected?: boolean;
width?: string;
}>`
padding: ${(props) =>
props.selected
? `${props.theme.spaces[1]}px 0px`
Expand All @@ -25,6 +29,7 @@ const OptionWrapper = styled.div<{ disabled?: boolean; selected?: boolean }>`
display: flex;
align-items: center;
user-select: none;
width: ${(props) => props.width};

&&& svg {
rect {
Expand Down Expand Up @@ -67,6 +72,7 @@ const OptionWrapper = styled.div<{ disabled?: boolean; selected?: boolean }>`

const CreateIconWrapper = styled.div`
margin: 0px 8px 0px 0px;
cursor: pointer;
`;

const ImageWrapper = styled.div`
Expand All @@ -84,6 +90,7 @@ const DatasourceImage = styled.img`

interface DataSourceOptionType extends RenderDropdownOptionType {
cypressSelector: string;
optionWidth?: string;
}

function DataSourceOption({
Expand All @@ -92,6 +99,7 @@ function DataSourceOption({
isSelectedNode,
option: dropdownOption,
optionClickHandler,
optionWidth,
}: DataSourceOptionType) {
const { label } = dropdownOption;
const { routeToCreateNewDatasource = () => null } = extraProps;
Expand Down Expand Up @@ -131,6 +139,7 @@ function DataSourceOption({
}
}}
selected={isSelectedNode}
width={optionWidth}
>
{isConnectNewDataSourceBtn ? (
<CreateIconWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,7 @@ function GeneratePageForm() {
key={option.id}
option={option}
optionClickHandler={optionClickHandler}
optionWidth={DROPDOWN_DIMENSION.WIDTH}
/>
)}
selected={selectedDatasource}
Expand Down