(options.map(option => option.value));
+ const filteredOptions = options.filter((option: any) => {
+ return !selectedValues.includes(option.value);
+ });
+ const selectedOptions = options.filter((option: any) => {
+ return selectedValues.includes(option.value);
+ });
+
+ const handleChange = ({ value }: any) => {
+ toggleSelectedValue(value);
+ }
+
+ const toggleSelectedValue = (value: string) => {
+ if (selectedValues.includes(value)) {
+ setSelectedValues(selectedValues.filter(v => v !== value));
+ } else {
+ setSelectedValues([...selectedValues, value]);
+ }
+ }
+
+ return (
+
+
+ );
+}
+
+export default FunnelIssuesDropdown;
\ No newline at end of file
diff --git a/frontend/app/components/Dashboard/components/FunnelIssuesDropdown/index.ts b/frontend/app/components/Dashboard/components/FunnelIssuesDropdown/index.ts
new file mode 100644
index 000000000..7b8b3555e
--- /dev/null
+++ b/frontend/app/components/Dashboard/components/FunnelIssuesDropdown/index.ts
@@ -0,0 +1 @@
+export { default } from './FunnelIssuesDropdown';
\ No newline at end of file
diff --git a/frontend/app/components/Dashboard/components/FunnelIssuesSelectedFilters/FunnelIssuesSelectedFilters.tsx b/frontend/app/components/Dashboard/components/FunnelIssuesSelectedFilters/FunnelIssuesSelectedFilters.tsx
new file mode 100644
index 000000000..c36ad5044
--- /dev/null
+++ b/frontend/app/components/Dashboard/components/FunnelIssuesSelectedFilters/FunnelIssuesSelectedFilters.tsx
@@ -0,0 +1,24 @@
+import React from 'react';
+import { Icon } from 'UI';
+
+interface Props {
+ options: any[];
+ removeSelectedValue: (value: string) => void;
+}
+function FunnelIssuesSelectedFilters(props: Props) {
+ const { options, removeSelectedValue } = props;
+ return (
+
+ {options.map((option, index) => (
+
+ {option.label}
+
+
+ ))}
+
+ );
+}
+
+export default FunnelIssuesSelectedFilters;
\ No newline at end of file
diff --git a/frontend/app/components/Dashboard/components/FunnelIssuesSelectedFilters/index.ts b/frontend/app/components/Dashboard/components/FunnelIssuesSelectedFilters/index.ts
new file mode 100644
index 000000000..a35f23d5f
--- /dev/null
+++ b/frontend/app/components/Dashboard/components/FunnelIssuesSelectedFilters/index.ts
@@ -0,0 +1 @@
+export { default } from './FunnelIssuesSelectedFilters';
\ No newline at end of file
diff --git a/frontend/app/components/shared/Select/Select.tsx b/frontend/app/components/shared/Select/Select.tsx
index a57be7e87..6cc11cbb4 100644
--- a/frontend/app/components/shared/Select/Select.tsx
+++ b/frontend/app/components/shared/Select/Select.tsx
@@ -9,27 +9,44 @@ interface Props {
defaultValue?: string;
plain?: boolean;
components?: any;
+ styles?: any;
[x:string]: any;
}
-export default function({ alignRight = false, plain = false, options, isSearchable = false, components = {}, defaultValue = '', ...rest }: Props) {
+export default function({ styles= {}, alignRight = false, plain = false, options, isSearchable = false, components = {}, defaultValue = '', ...rest }: Props) {
const defaultSelected = defaultValue ? options.find(x => x.value === defaultValue) : null;
const customStyles = {
option: (provided, state) => ({
- ...provided,
- whiteSpace: 'nowrap',
+ ...provided,
+ whiteSpace: 'nowrap',
+ transition: 'all 0.3s',
+ backgroundColor: state.isFocused ? colors['active-blue'] : 'transparent',
+ color: state.isFocused ? colors.teal : 'black',
+ '&:hover': {
+ transition: 'all 0.2s',
+ backgroundColor: colors['active-blue'],
+ },
+ '&:focus': {
+ transition: 'all 0.2s',
+ backgroundColor: colors['active-blue'],
+ }
}),
menu: (provided, state) => ({
...provided,
top: 31,
- border: 'solid thin #ccc',
+ border: `1px solid ${colors['gray-light']}`,
borderRadius: '3px',
backgroundColor: '#fff',
- boxShadow: '0px 0px 10px rgba(0, 0, 0, 0.1)',
+ boxShadow: '1px 1px 1px rgba(0, 0, 0, 0.1)',
position: 'absolute',
minWidth: 'fit-content',
+ overflow: 'hidden',
...(alignRight && { right: 0 })
}),
+ menuList: (provided, state) => ({
+ ...provided,
+ padding: 0,
+ }),
control: (provided) => {
const obj = {
...provided,
@@ -63,7 +80,12 @@ export default function({ alignRight = false, plain = false, options, isSearchab
const transition = 'opacity 300ms';
return { ...provided, opacity, transition };
- }
+ },
+ noOptionsMessage: (provided) => ({
+ ...provided,
+ whiteSpace: 'nowrap !important',
+ // minWidth: 'fit-content',
+ }),
}
@@ -77,7 +99,7 @@ export default function({ alignRight = false, plain = false, options, isSearchab
DropdownIndicator,
...components,
}}
- styles={customStyles}
+ styles={{ ...customStyles, ...styles }}
theme={(theme) => ({
...theme,
colors: {