mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat: Change Model Select To Mantine
This commit is contained in:
parent
0e3106f631
commit
9a914250a0
@ -1,17 +1,15 @@
|
||||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import { ChangeEvent, memo, useCallback } from 'react';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import { ChangeEvent, memo, useCallback } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||
import { selectModelsAll, selectModelsById } from '../store/modelSlice';
|
||||
import { Select } from '@mantine/core';
|
||||
import { RootState } from 'app/store/store';
|
||||
import { modelSelected } from 'features/parameters/store/generationSlice';
|
||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||
import { IAICustomSelectOption } from 'common/components/IAICustomSelect';
|
||||
import { generationSelector } from 'features/parameters/store/generationSelectors';
|
||||
import IAICustomSelect, {
|
||||
IAICustomSelectOption,
|
||||
} from 'common/components/IAICustomSelect';
|
||||
import IAISelect from 'common/components/IAISelect';
|
||||
import { modelSelected } from 'features/parameters/store/generationSlice';
|
||||
import { selectModelsAll, selectModelsById } from '../store/modelSlice';
|
||||
|
||||
const selector = createSelector(
|
||||
[(state: RootState) => state, generationSelector],
|
||||
@ -64,13 +62,13 @@ const ModelSelect = () => {
|
||||
// );
|
||||
|
||||
return (
|
||||
<IAISelect
|
||||
<Select
|
||||
label={t('modelManager.model')}
|
||||
tooltip={selectedModel?.description}
|
||||
validValues={modelData}
|
||||
value={selectedModel?.name ?? ''}
|
||||
placeholder="Pick one"
|
||||
data={modelData}
|
||||
searchable
|
||||
onChange={handleChangeModel}
|
||||
tooltipProps={{ placement: 'top', hasArrow: true }}
|
||||
/>
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user