pixel-react 1.8.6 → 1.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.yarn/install-state.gz +0 -0
- package/lib/1fb4472b34e4fe07.css +1 -0
- package/lib/StyleGuide/ColorPalette/ColorPalette.stories.d.ts +6 -0
- package/lib/StyleGuide/Typography/Typography.stories.d.ts +6 -0
- package/lib/assets/fonts/Poppins-Bold.ttf +0 -0
- package/lib/assets/fonts/Poppins-Medium.ttf +0 -0
- package/lib/assets/fonts/Poppins-Regular.ttf +0 -0
- package/lib/assets/fonts/Poppins-SemiBold.ttf +0 -0
- package/lib/components/Accordion/Accordion.stories.d.ts +6 -0
- package/lib/components/AddButton/AddButton.d.ts +5 -0
- package/lib/components/AddButton/AddButton.stories.d.ts +6 -0
- package/lib/components/AddButton/index.d.ts +1 -0
- package/lib/components/AddButton/types.d.ts +4 -0
- package/lib/components/AddResourceButton/AddButton.stories.d.ts +8 -0
- package/lib/components/AddVariables/AddVariables.d.ts +5 -0
- package/lib/components/AddVariables/index.d.ts +1 -0
- package/lib/components/AddVariables/types.d.ts +35 -0
- package/lib/components/AllProjectsDropdown/AllProjectsDropdown.stories.d.ts +7 -0
- package/lib/components/AppHeader/AppHeader.stories.d.ts +7 -0
- package/lib/components/AttachImage/AttachImage.stories.d.ts +7 -0
- package/lib/components/AttachmentButton/AttachmentButton.stories.d.ts +9 -0
- package/lib/components/Avatar/Avatar.stories.d.ts +10 -0
- package/lib/components/Button/Button.d.ts +2 -2
- package/lib/components/Button/Button.stories.d.ts +13 -0
- package/lib/components/Charts/BarChart/BarChart.stories.d.ts +6 -0
- package/lib/components/Charts/DashboardDonutChart/DashboardDonutChart.stories.d.ts +7 -0
- package/lib/components/Charts/DonutChart/DonutChart.stories.d.ts +6 -0
- package/lib/components/Charts/IconRadialChart/IconRadialChart.stories.d.ts +8 -0
- package/lib/components/Charts/LineChart/LineChart.stories.d.ts +7 -0
- package/lib/components/Charts/MultiRadialChart/MultiRadialChart.stories.d.ts +8 -0
- package/lib/components/Charts/PieChart/PieChart.stories.d.ts +7 -0
- package/lib/components/Charts/RadialChart/RadialChart.stories.d.ts +6 -0
- package/lib/components/Checkbox/Checkbox.stories.d.ts +8 -0
- package/lib/components/Chip/Chip.stories.d.ts +14 -0
- package/lib/components/ChooseFile/ChooseFile.d.ts +3 -2
- package/lib/components/ConnectingBranch/ConnectingBranch.stories.d.ts +6 -0
- package/lib/components/DatePicker/DatePicker.stories.d.ts +9 -0
- package/lib/components/DragAndDrop/DragAndDrop.stories.d.ts +6 -0
- package/lib/components/Drawer/Drawer.stories.d.ts +12 -0
- package/lib/components/EditTextField/EditTextField.stories.d.ts +10 -0
- package/lib/components/Editor/Editor.stories.d.ts +6 -0
- package/lib/components/Excel/ContextMenu/ContextMenu.d.ts +4 -0
- package/lib/components/Excel/ExcelFile.stories.d.ts +6 -0
- package/lib/components/ExcelFile/ChangeExcelStyles.d.ts +14 -0
- package/lib/components/ExcelFile/ColorBarSelector/ColorBarSelector.d.ts +8 -0
- package/lib/components/ExcelFile/ContextMenu/ContextMenu.d.ts +4 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/ActiveCell.d.ts +7 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/Cell.d.ts +4 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.d.ts +5 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/Copied.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/CornerIndicator.d.ts +5 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/DataEditor.d.ts +5 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/DataViewer.d.ts +8 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/FloatingRect.d.ts +10 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/HeaderRow.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/Row.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/RowIndicator.d.ts +5 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/Selected.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/Spreadsheet.d.ts +80 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/Table.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/actions.d.ts +174 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/areModelsEqual.d.ts +1 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/context.d.ts +8 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/engine.d.ts +22 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/formula.d.ts +17 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/index.d.ts +2 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-graph.d.ts +21 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-hash.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-set.d.ts +24 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/index.d.ts +13 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/matrix.d.ts +67 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/point-range.d.ts +22 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/point.d.ts +11 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/reducer.d.ts +27 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/selection.d.ts +95 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/types.d.ts +178 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/use-dispatch.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/use-selector.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/util.d.ts +44 -0
- package/lib/components/ExcelFile/ExcelFile/ExcelFile.d.ts +19 -0
- package/lib/components/ExcelFile/ExcelFile.stories.d.ts +6 -0
- package/lib/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.d.ts +12 -0
- package/lib/components/ExcelFile/ExcelToolBar/ExcelToolBar.d.ts +15 -0
- package/lib/components/ExcelFile/ImportExcelStyles.d.ts +24 -0
- package/lib/components/ExcelFile/Types.d.ts +129 -0
- package/lib/components/ExcelFile/index.d.ts +1 -0
- package/lib/components/ExpandableMenu/ExpandableMenu.stories.d.ts +7 -0
- package/lib/components/FF_Captcha/captcha.stories.d.ts +8 -0
- package/lib/components/FileDropzone/FileDropzone.stories.d.ts +8 -0
- package/lib/components/Form/Form.stories.d.ts +7 -0
- package/lib/components/GridLayout/GridLayout.stories.d.ts +8 -0
- package/lib/components/HighlightText/HighlightText.stories.d.ts +6 -0
- package/lib/components/Icon/Icon.stories.d.ts +8 -0
- package/lib/components/IconButton/IconButton.stories.d.ts +7 -0
- package/lib/components/IconRadioGroup/IconRadioGroup.stories.d.ts +7 -0
- package/lib/components/Input/Input.stories.d.ts +9 -0
- package/lib/components/InputWithDropdown/InputWithDropdown.stories.d.ts +9 -0
- package/lib/components/LabelEditTextField/LabelEditTextField.stories.d.ts +13 -0
- package/lib/components/LazyLoad/LazyLoad.stories.d.ts +6 -0
- package/lib/components/MachineInputField/MachineInputField.stories.d.ts +6 -0
- package/lib/components/MenuOption/MenuOption.stories.d.ts +16 -0
- package/lib/components/MiniModal/MiniModal.stories.d.ts +10 -0
- package/lib/components/Modal/Modal.stories.d.ts +7 -0
- package/lib/components/ModulesChip/ModuleChip.stories.d.ts +6 -0
- package/lib/components/MultiSelect/MultiSelect.stories.d.ts +11 -0
- package/lib/components/NLPInput/NlpInput.stories.d.ts +7 -0
- package/lib/components/NLPInput/type.d.ts +70 -0
- package/lib/components/Paper/Paper.stories.d.ts +11 -0
- package/lib/components/RadioButton/RadioButton.stories.d.ts +10 -0
- package/lib/components/RadioGroup/RadioGroup.stories.d.ts +9 -0
- package/lib/components/Search/Search.d.ts +1 -1
- package/lib/components/Search/Search.stories.d.ts +6 -0
- package/lib/components/Search/types.d.ts +1 -0
- package/lib/components/Select/Select.stories.d.ts +14 -0
- package/lib/components/Select/components/Dropdown/Dropdown.d.ts +4 -0
- package/lib/components/Select/components/Dropdown/dropdownTypes.d.ts +17 -0
- package/lib/components/SequentialConnectingBranch/SequentialConnectingBranch.stories.d.ts +6 -0
- package/lib/components/SequentialConnectingBranch/components/AddBrowserModal/AddBrowserModal.d.ts +4 -0
- package/lib/components/SequentialConnectingBranch/components/AddBrowserModal/types.d.ts +3 -0
- package/lib/components/SequentialConnectingBranch/components/DatasetListModal/DatasetListModal.d.ts +4 -0
- package/lib/components/SequentialConnectingBranch/components/DatasetListModal/types.d.ts +3 -0
- package/lib/components/StateDropdown/StateDropdown.stories.d.ts +10 -0
- package/lib/components/StatusButton/StatusButton.stories.d.ts +14 -0
- package/lib/components/StatusCard/StatusCard.stories.d.ts +11 -0
- package/lib/components/Table/Table.stories.d.ts +13 -0
- package/lib/components/TableTree/TableTree.stories.d.ts +7 -0
- package/lib/components/Tabs/Tabs.stories.d.ts +9 -0
- package/lib/components/TextArea/Textarea.stories.d.ts +9 -0
- package/lib/components/Toast/Toast.stories.d.ts +6 -0
- package/lib/components/Toastify/Toastify.stories.d.ts +6 -0
- package/lib/components/Toggle/Toggle.stories.d.ts +12 -0
- package/lib/components/Tooltip/Tooltip.stories.d.ts +15 -0
- package/lib/components/Typography/Typography.stories.d.ts +10 -0
- package/lib/components/VariableInput/VariableInput.stories.d.ts +6 -0
- package/lib/index.d.ts +6 -5
- package/lib/index.esm.js +1375 -4525
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +1375 -4525
- package/lib/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/utils/checkEmpty/checkEmpty.stories.d.ts +6 -0
- package/lib/utils/compareArrays/compareArrays.stories.d.ts +6 -0
- package/lib/utils/compareObjects/compareObjects.stories.d.ts +6 -0
- package/lib/utils/debounce/debounce.stories.d.ts +6 -0
- package/lib/utils/ffID/ffID.stories.d.ts +6 -0
- package/lib/utils/find/findAndInsert.d.ts +7 -0
- package/lib/utils/find/findAndInsert.stories.d.ts +7 -0
- package/lib/utils/findAndInsert/findAndInsert.stories.d.ts +7 -0
- package/lib/utils/getEncryptedData/getEncryptedData.stories.d.ts +6 -0
- package/lib/utils/getExtension/getExtension.stories.d.ts +6 -0
- package/lib/utils/getSequentialPayload/getSequentialPayload.stories.d.ts +10 -0
- package/lib/utils/throttle/throttle.stories.d.ts +6 -0
- package/lib/utils/truncateText/truncateText.stories.d.ts +6 -0
- package/package.json +3 -3
- package/src/assets/icons/approval_pending.svg +8 -8
- package/src/assets/icons/configuration.svg +3 -3
- package/src/assets/icons/defects.svg +8 -8
- package/src/assets/icons/element.svg +4 -4
- package/src/assets/icons/project_element.svg +4 -4
- package/src/assets/icons/step_group.svg +10 -10
- package/src/assets/icons/variable.svg +3 -3
- package/src/assets/icons/web_service_icon.svg +3 -3
- package/src/components/AllProjectsDropdown/AllProjectsDropdown.scss +7 -45
- package/src/components/AllProjectsDropdown/AllProjectsDropdown.stories.tsx +5 -0
- package/src/components/AllProjectsDropdown/AllProjectsDropdown.tsx +76 -64
- package/src/components/Button/Button.tsx +3 -4
- package/src/components/ChooseFile/ChooseFile.tsx +3 -4
- package/src/components/Search/Search.scss +8 -0
- package/src/components/Search/Search.tsx +17 -6
- package/src/components/Search/types.ts +1 -0
@@ -14,6 +14,11 @@ const meta: Meta<typeof AllProjectsDropdown> = {
|
|
14
14
|
|
15
15
|
type Story = StoryObj<typeof AllProjectsDropdown>;
|
16
16
|
const options = [
|
17
|
+
{
|
18
|
+
label: 'All Projects',
|
19
|
+
value: 'All Projects',
|
20
|
+
iconName: 'all_projects',
|
21
|
+
},
|
17
22
|
{
|
18
23
|
label:
|
19
24
|
'Pantaloon Project Pantaloon Web Project Pantaloon Web Project Pantaloon Web Project Pantaloon Web Project',
|
@@ -7,6 +7,7 @@ import classNames from 'classnames';
|
|
7
7
|
import { AllProjectsDropdownProps, optionsType } from './types';
|
8
8
|
import Tooltip from '../Tooltip';
|
9
9
|
import useClickOutside from '../../hooks/useClickOutside';
|
10
|
+
import Search from '../Search';
|
10
11
|
|
11
12
|
const AllProjectsDropdown = ({
|
12
13
|
onClick = () => {},
|
@@ -21,8 +22,8 @@ const AllProjectsDropdown = ({
|
|
21
22
|
}: AllProjectsDropdownProps) => {
|
22
23
|
const [showOptions, setShowOptions] = useState(false);
|
23
24
|
const [selectedOptions, setSelectedOptions] = useState(selectedOption);
|
24
|
-
const [search, setSearch] = useState(true);
|
25
25
|
const optionsRef = useRef<HTMLDivElement>(null);
|
26
|
+
const [optionsList, setOptionSList] = useState<optionsType[]>(options);
|
26
27
|
|
27
28
|
const handleShowOption = () => {
|
28
29
|
setShowOptions(!showOptions);
|
@@ -34,17 +35,22 @@ const AllProjectsDropdown = ({
|
|
34
35
|
setSelectedOptions(option);
|
35
36
|
closeOptions();
|
36
37
|
onClick(option);
|
38
|
+
setSearchValue('');
|
39
|
+
setOptionSList(options);
|
37
40
|
};
|
38
41
|
|
39
|
-
const
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
42
|
+
const [searchValue, setSearchValue] = useState('');
|
43
|
+
const handleSearch = (query: string) => {
|
44
|
+
setSearchValue(query);
|
45
|
+
if (query !== '') {
|
46
|
+
let filterData = options.filter((option) =>
|
47
|
+
option.label.toLowerCase().includes(query.toLowerCase())
|
48
|
+
);
|
49
|
+
setOptionSList(filterData);
|
50
|
+
} else {
|
51
|
+
setSearchValue('');
|
52
|
+
setOptionSList(options);
|
53
|
+
}
|
48
54
|
};
|
49
55
|
useClickOutside(optionsRef, closeOptions);
|
50
56
|
return (
|
@@ -82,66 +88,72 @@ const AllProjectsDropdown = ({
|
|
82
88
|
</div>
|
83
89
|
{showOptions && (
|
84
90
|
<div className={classNames('ff-projects-dropdown')} ref={optionsRef}>
|
85
|
-
<
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
{
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
91
|
+
<Search
|
92
|
+
onSearch={handleSearch}
|
93
|
+
value={searchValue}
|
94
|
+
isExpand={true}
|
95
|
+
onClose={() => {}}
|
96
|
+
onExpand={() => {}}
|
97
|
+
showClose={false}
|
98
|
+
/>
|
99
|
+
<div className={classNames('option-card')}>
|
100
|
+
{optionsList.map(
|
101
|
+
(option, index) =>
|
102
|
+
index === 0 && (
|
103
|
+
<div
|
104
|
+
key={index}
|
105
|
+
onClick={() => handleSelectOption(option)}
|
106
|
+
className={classNames('ff-projects-options', {
|
107
|
+
['ff-selected-option']:
|
108
|
+
selectedOption.label === option.label,
|
109
|
+
})}
|
110
|
+
>
|
111
|
+
<div className={classNames('ff-projects-icons')}>
|
112
|
+
<Icon name={option.iconName} height={12} width={12} />
|
113
|
+
</div>
|
114
|
+
<Typography
|
115
|
+
key={index}
|
116
|
+
as={'div'}
|
117
|
+
lineHeight={'30px'}
|
118
|
+
className="ff-projects-label"
|
119
|
+
>
|
120
|
+
<Tooltip title={option.label}>{option.label}</Tooltip>
|
121
|
+
</Typography>
|
122
|
+
</div>
|
123
|
+
)
|
124
|
+
)}
|
117
125
|
</div>
|
118
126
|
<div
|
119
127
|
className={classNames(
|
120
128
|
'option-card',
|
121
|
-
`${
|
129
|
+
`${optionsList.length > 4 ? 'scroll' : ''}`
|
122
130
|
)}
|
123
131
|
>
|
124
|
-
{
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
132
|
+
{optionsList.map(
|
133
|
+
(option, index) =>
|
134
|
+
index > 0 && (
|
135
|
+
<div
|
136
|
+
key={index}
|
137
|
+
onClick={() => handleSelectOption(option)}
|
138
|
+
className={classNames('ff-projects-options', {
|
139
|
+
['ff-selected-option']:
|
140
|
+
selectedOption.label === option.label,
|
141
|
+
})}
|
142
|
+
>
|
143
|
+
<div className={classNames('ff-projects-icons')}>
|
144
|
+
<Icon name={option.iconName} height={12} width={12} />
|
145
|
+
</div>
|
146
|
+
<Typography
|
147
|
+
key={index}
|
148
|
+
as={'div'}
|
149
|
+
lineHeight={'30px'}
|
150
|
+
className="ff-projects-label"
|
151
|
+
>
|
152
|
+
<Tooltip title={option.label}>{option.label}</Tooltip>
|
153
|
+
</Typography>
|
154
|
+
</div>
|
155
|
+
)
|
156
|
+
)}
|
145
157
|
</div>
|
146
158
|
</div>
|
147
159
|
)}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { forwardRef
|
1
|
+
import { forwardRef } from 'react';
|
2
2
|
import './Button.scss';
|
3
3
|
import '../../assets/styles/_colors.scss';
|
4
4
|
import Icon from '../Icon';
|
@@ -6,8 +6,7 @@ import { ButtonProps } from './types';
|
|
6
6
|
import classNames from 'classnames';
|
7
7
|
import Typography from '../Typography';
|
8
8
|
|
9
|
-
|
10
|
-
prevProps.selectedFile?.name === nextProps.selectedFile?.name;
|
9
|
+
|
11
10
|
|
12
11
|
const Button = forwardRef<HTMLButtonElement, ButtonProps>(
|
13
12
|
(
|
@@ -88,4 +87,4 @@ const Button = forwardRef<HTMLButtonElement, ButtonProps>(
|
|
88
87
|
);
|
89
88
|
}
|
90
89
|
);
|
91
|
-
export default
|
90
|
+
export default Button;
|
@@ -1,9 +1,8 @@
|
|
1
|
-
import {
|
1
|
+
import { type FC } from 'react'
|
2
2
|
import { ChooseFileProps } from './types'
|
3
3
|
import Button from '../Button'
|
4
4
|
|
5
|
-
|
6
|
-
prevProps.selectedFile?.name === nextProps.selectedFile?.name;
|
5
|
+
|
7
6
|
|
8
7
|
const ChooseFile:FC<ChooseFileProps> = ({
|
9
8
|
variant = 'primary',
|
@@ -43,4 +42,4 @@ const ChooseFile:FC<ChooseFileProps> = ({
|
|
43
42
|
)
|
44
43
|
}
|
45
44
|
|
46
|
-
export default
|
45
|
+
export default ChooseFile;
|
@@ -86,12 +86,20 @@
|
|
86
86
|
cursor: pointer;
|
87
87
|
width: 22px;
|
88
88
|
padding-top: 1px;
|
89
|
+
|
90
|
+
&.showClose {
|
91
|
+
display: none
|
92
|
+
}
|
89
93
|
}
|
90
94
|
|
91
95
|
.ff-search-close-icon {
|
92
96
|
margin: 4px;
|
93
97
|
cursor: pointer;
|
94
98
|
|
99
|
+
&.showClose {
|
100
|
+
display: none
|
101
|
+
}
|
102
|
+
|
95
103
|
.ff-icon-container {
|
96
104
|
svg {
|
97
105
|
path {
|
@@ -16,12 +16,13 @@ const Search = ({
|
|
16
16
|
isExpand = false,
|
17
17
|
onClose,
|
18
18
|
onExpand,
|
19
|
+
showClose = true,
|
19
20
|
}: SearchProps) => {
|
20
21
|
const [searchValue, setSearchValue] = useState<string>(value);
|
21
22
|
const inputRef = useRef<HTMLInputElement>(null);
|
22
23
|
|
23
24
|
useEffect(() => {
|
24
|
-
if (isExpand && inputRef.current) {
|
25
|
+
if (isExpand && inputRef.current && showClose) {
|
25
26
|
inputRef.current.focus();
|
26
27
|
}
|
27
28
|
setSearchValue('');
|
@@ -45,7 +46,7 @@ const Search = ({
|
|
45
46
|
if (label === 'Close') {
|
46
47
|
onClose?.();
|
47
48
|
}
|
48
|
-
if (label === 'Clear' && isExpand && inputRef.current) {
|
49
|
+
if (label === 'Clear' && isExpand && inputRef.current && showClose) {
|
49
50
|
inputRef.current.focus();
|
50
51
|
}
|
51
52
|
};
|
@@ -57,8 +58,12 @@ const Search = ({
|
|
57
58
|
};
|
58
59
|
const handleChange = (data: string) => {
|
59
60
|
setSearchValue(data);
|
60
|
-
if (
|
61
|
-
|
61
|
+
if (showClose) {
|
62
|
+
if (data === '') {
|
63
|
+
onSearch('');
|
64
|
+
}
|
65
|
+
} else {
|
66
|
+
onSearch(data);
|
62
67
|
}
|
63
68
|
};
|
64
69
|
|
@@ -105,7 +110,9 @@ const Search = ({
|
|
105
110
|
{isExpand && (
|
106
111
|
<>
|
107
112
|
<div
|
108
|
-
className=
|
113
|
+
className={classNames('ff-search-clear-button', {
|
114
|
+
showClose: !showClose,
|
115
|
+
})}
|
109
116
|
onClick={() => handleSearchClearAndClose('Clear')}
|
110
117
|
>
|
111
118
|
{searchValue !== '' && (
|
@@ -117,7 +124,11 @@ const Search = ({
|
|
117
124
|
)}
|
118
125
|
</div>
|
119
126
|
<Tooltip title="Close">
|
120
|
-
<div
|
127
|
+
<div
|
128
|
+
className={classNames('ff-search-close-icon', {
|
129
|
+
showClose: !showClose,
|
130
|
+
})}
|
131
|
+
>
|
121
132
|
<Icon
|
122
133
|
height={6}
|
123
134
|
width={6}
|