Skip to content

Commit

Permalink
Add space for the dropdown in edit labels dialog
Browse files Browse the repository at this point in the history
Issue #175
  • Loading branch information
qu1ck committed Mar 18, 2024
1 parent 09ccc6a commit d3bd0b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/components/modals/common.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ interface TorrentLabelsProps {
setLabels: React.Dispatch<string[]>,
inputLabel?: string,
disabled?: boolean,
initiallyOpened?: boolean,
}

export function TorrentLabels(props: TorrentLabelsProps) {
Expand All @@ -262,6 +263,7 @@ export function TorrentLabels(props: TorrentLabelsProps) {
withinPortal
searchable
creatable
initiallyOpened={props.initiallyOpened}
disabled={props.disabled}
getCreateLabel={(query) => `+ Add ${query}`}
onCreate={(query) => {
Expand Down
6 changes: 4 additions & 2 deletions src/components/modals/editlabels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import { Text } from "@mantine/core";
import { Box, Text } from "@mantine/core";
import type { ModalState } from "./common";
import { SaveCancelModal, TorrentLabels, TorrentsNames } from "./common";
import React, { useCallback, useEffect, useState } from "react";
Expand Down Expand Up @@ -97,7 +97,9 @@ export function EditLabelsModal(props: ModalState) {
<Text mb="md">Enter new labels for</Text>
<TorrentsNames />
</>}
<TorrentLabels labels={labels} setLabels={setLabels} disabled={rpcVersion < 16} />
<Box mih="17rem">
<TorrentLabels labels={labels} setLabels={setLabels} disabled={rpcVersion < 16} initiallyOpened />
</Box>
</SaveCancelModal>}
</>;
}

0 comments on commit d3bd0b7

Please sign in to comment.