Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion app/client/src/components/ads/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export type DropdownProps = CommonComponentProps &
width?: string;
height?: string;
showLabelOnly?: boolean;
showOptionsOnLoad?: boolean;
Comment thread
rishabhrathod01 marked this conversation as resolved.
Outdated
optionWidth?: string;
dropdownHeight?: string;
dropdownMaxHeight?: string;
Expand Down Expand Up @@ -450,8 +451,9 @@ export default function Dropdown(props: DropdownProps) {
SelectedValueNode = DefaultDropDownValueNode,
renderOption,
errorMsg = "",
showOptionsOnLoad = false,
} = { ...props };
const [isOpen, setIsOpen] = useState<boolean>(false);
const [isOpen, setIsOpen] = useState<boolean>(showOptionsOnLoad);
const [selected, setSelected] = useState<DropdownOption>(props.selected);

useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,9 @@ function GeneratePageForm() {
const isGoogleSheetPlugin =
selectedDatasourcePluginPackageName === PLUGIN_PACKAGE_NAME.GOOGLE_SHEETS;

const showSearchableColumnDropdown =
PLUGIN_PACKAGE_NAME.S3 !== selectedDatasourcePluginPackageName;

return (
<div>
<Wrapper>
Expand Down Expand Up @@ -435,6 +438,7 @@ function GeneratePageForm() {
)}
selected={selectedDatasource}
showLabelOnly
showOptionsOnLoad
width={DROPDOWN_DIMENSION.WIDTH}
/>
</SelectWrapper>
Expand All @@ -457,6 +461,7 @@ function GeneratePageForm() {
options={datasourceTableOptions}
selected={selectedTable}
showLabelOnly
showOptionsOnLoad
width={DROPDOWN_DIMENSION.WIDTH}
/>
</SelectWrapper>
Expand All @@ -472,7 +477,7 @@ function GeneratePageForm() {
type="button"
/>
)}
{selectedTable.value ? (
{selectedTable.value && showSearchableColumnDropdown && (
<SelectWrapper>
<Label>
Select a searchable {columnLabel} from
Expand All @@ -487,10 +492,11 @@ function GeneratePageForm() {
options={selectedTableColumnOptions}
selected={selectedColumn}
showLabelOnly
showOptionsOnLoad
width={DROPDOWN_DIMENSION.WIDTH}
/>
</SelectWrapper>
) : null}
)}
</>
) : (
<GoogleSheetForm
Expand Down
3 changes: 1 addition & 2 deletions app/client/src/selectors/entitiesSelector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,7 @@ export const getGenerateCRUDEnabledPluginMap = createSelector(
plugins.map((plugin) => {
if (
plugin.generateCRUDPageComponent &&
plugin.packageName !== PLUGIN_PACKAGE_NAME.GOOGLE_SHEETS &&
plugin.packageName !== PLUGIN_PACKAGE_NAME.S3
plugin.packageName !== PLUGIN_PACKAGE_NAME.GOOGLE_SHEETS
) {
pluginIdGenerateCRUDPageEnabled[plugin.id] = plugin.packageName;
}
Expand Down