mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): fix UpdateImageBoardModal select
This commit is contained in:
parent
d604d986f9
commit
49a02c157b
@ -18,12 +18,11 @@ import { AddImageToBoardContext } from '../../../../app/contexts/AddImageToBoard
|
|||||||
import { useSelector } from 'react-redux';
|
import { useSelector } from 'react-redux';
|
||||||
import { selectBoardsAll } from '../../store/boardSlice';
|
import { selectBoardsAll } from '../../store/boardSlice';
|
||||||
import IAISelect from '../../../../common/components/IAISelect';
|
import IAISelect from '../../../../common/components/IAISelect';
|
||||||
|
import IAIMantineSelect from 'common/components/IAIMantineSelect';
|
||||||
|
|
||||||
const UpdateImageBoardModal = () => {
|
const UpdateImageBoardModal = () => {
|
||||||
const boards = useSelector(selectBoardsAll);
|
const boards = useSelector(selectBoardsAll);
|
||||||
const [selectedBoard, setSelectedBoard] = useState<string | undefined>(
|
const [selectedBoard, setSelectedBoard] = useState<string | null>(null);
|
||||||
undefined
|
|
||||||
);
|
|
||||||
|
|
||||||
const { isOpen, onClose, handleAddToBoard, image } = useContext(
|
const { isOpen, onClose, handleAddToBoard, image } = useContext(
|
||||||
AddImageToBoardContext
|
AddImageToBoardContext
|
||||||
@ -55,10 +54,14 @@ const UpdateImageBoardModal = () => {
|
|||||||
Moving this image to a board will remove it from its existing
|
Moving this image to a board will remove it from its existing
|
||||||
board.
|
board.
|
||||||
</Text>
|
</Text>
|
||||||
<IAISelect
|
<IAIMantineSelect
|
||||||
placeholder="Select Board"
|
placeholder="Select Board"
|
||||||
onChange={(e) => setSelectedBoard(e.target.value)}
|
onChange={(v) => setSelectedBoard(v)}
|
||||||
validValues={boards.map((board) => board.board_name)}
|
value={selectedBoard}
|
||||||
|
data={boards.map((board) => ({
|
||||||
|
label: board.board_name,
|
||||||
|
value: board.board_id,
|
||||||
|
}))}
|
||||||
/>
|
/>
|
||||||
</Flex>
|
</Flex>
|
||||||
</Box>
|
</Box>
|
||||||
|
Loading…
Reference in New Issue
Block a user