Remove hotkeys and fix tag selection (#505)

* Remove broken scene player hotkeys
* Disable closing tag select menu after a select
This commit is contained in:
InfiniteTF
2020-04-29 01:55:34 +02:00
committed by GitHub
parent 52a1059380
commit a0306bfbd2
24 changed files with 116 additions and 142 deletions

View File

@@ -42,6 +42,7 @@ interface ISelectProps {
placeholder?: string;
showDropdown?: boolean;
groupHeader?: string;
closeMenuOnSelect?: boolean;
}
interface ISceneGallerySelect {
@@ -355,6 +356,7 @@ export const TagSelect: React.FC<IFilterProps> = (props) => {
items={items}
onCreateOption={onCreate}
selectedOptions={selected}
closeMenuOnSelect={false}
/>
);
};
@@ -376,6 +378,7 @@ const SelectComponent: React.FC<ISelectProps & ITypeProps> = ({
placeholder,
showDropdown = true,
groupHeader,
closeMenuOnSelect = true,
}) => {
const defaultValue =
items.filter((item) => initialIds?.indexOf(item.value) !== -1) ?? null;
@@ -421,6 +424,7 @@ const SelectComponent: React.FC<ISelectProps & ITypeProps> = ({
isDisabled,
isLoading,
styles,
closeMenuOnSelect,
components: {
IndicatorSeparator: () => null,
...((!showDropdown || isDisabled) && { DropdownIndicator: () => null }),