{
+ selectingRef.current = true
+ }}
+ onCompositionStart={() => {
+ composingRef.current = true
+ }}
+ onCompositionEnd={() => {
+ composingRef.current = false
+ syncFromDom()
+ }}
+ onFocus={(event) => {
+ focusedRef.current = true
+ setFocused(true)
+ onFocus?.(event)
+ }}
+ onBlur={(event) => {
+ focusedRef.current = false
+ selectingRef.current = false
+ setFocused(false)
+ const next = normalize(serializeNode(editorRef.current))
+ paint(next)
+ if (next !== valueRef.current) emitChange(next)
+ onBlur?.(event)
+ }}
+ style={{
+ // Match antd's `> input.ant-input` resets inside affix-wrapper
+ display: 'block',
+ padding: 0,
+ border: 'none',
+ borderRadius: 0,
+ outline: 'none',
+ boxShadow: 'none',
+ background: 'transparent',
+ flex: 'auto',
+ minWidth: 0,
+ width: '100%',
+ fontSize: 'inherit',
+ lineHeight: 'inherit',
+ color: 'inherit',
+ whiteSpace: 'nowrap',
+ overflowX: 'auto',
+ overflowY: 'hidden',
+ scrollbarWidth: 'none',
+ msOverflowStyle: 'none',
+ wordBreak: 'keep-all',
+ overflowWrap: 'normal',
+ caretColor: token.colorText,
+ cursor: disabled ? 'not-allowed' : 'text'
+ }}
+ />
+ {showClear && (
+
+
+
+
+
+ )}
+
+ )
+ )
+}
+
+FilterInput.propTypes = {
+ value: PropTypes.string,
+ onChange: PropTypes.func,
+ placeholder: PropTypes.string,
+ disabled: PropTypes.bool,
+ allowClear: PropTypes.bool,
+ className: PropTypes.string,
+ style: PropTypes.object,
+ onFocus: PropTypes.func,
+ onBlur: PropTypes.func,
+ onPressEnter: PropTypes.func,
+ size: PropTypes.oneOf(['small', 'middle', 'large'])
+}
+
+export default FilterInput
+export { OPERANDS, tokenize }
diff --git a/src/components/Dashboard/common/FilterSidebar.jsx b/src/components/Dashboard/common/FilterSidebar.jsx
index ec7df4a..11ecb92 100644
--- a/src/components/Dashboard/common/FilterSidebar.jsx
+++ b/src/components/Dashboard/common/FilterSidebar.jsx
@@ -1,5 +1,6 @@
import { useMemo, useState, useEffect, useRef, useCallback } from 'react'
-import { Card, Select, Input, Button, Flex, Space, Dropdown } from 'antd'
+import { Card, Select, Button, Flex, Space, Dropdown } from 'antd'
+import FilterInput from './FilterInput'
import { CloseOutlined } from '@ant-design/icons'
import PropTypes from 'prop-types'
import PlusIcon from '../../Icons/PlusIcon'
@@ -161,10 +162,10 @@ const FilterSidebar = ({
style={{ minWidth: 80 }}
allowClear={false}
/>
-
changeValue(row.field, e.target.value)}
+ onChange={(value) => changeValue(row.field, value)}
style={{ flex: 1 }}
/>