dtable-ui-component 6.0.110-oot.15 → 6.0.110-oot.16
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.
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
|
|
2
|
+
.seatable-search-input {
|
|
3
|
+
width: 100%;
|
|
4
|
+
padding: 6px 10px;
|
|
5
|
+
min-width: 170px;
|
|
6
|
+
position: relative;
|
|
7
|
+
padding: 0;
|
|
8
|
+
height: 32px;
|
|
9
|
+
border-bottom: 1px solid var(--bs-border-color);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.seatable-search-input .form-control {
|
|
13
|
+
height: 32px;
|
|
14
|
+
border: none;
|
|
15
|
+
padding: .375rem 1rem;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
border-bottom: 1px solid var(--bs-border-color);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.seatable-search-input .form-control:focus {
|
|
21
|
+
outline: none;
|
|
22
|
+
box-shadow: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.seatable-search-input .input-icon-addon {
|
|
26
|
+
z-index: 1;
|
|
27
|
+
pointer-events: auto;
|
|
28
|
+
min-width: 2.5rem !important;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.seatable-search-input .input-icon-addon svg {
|
|
32
|
+
color: #999;
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.seatable-search-input .none-search-result {
|
|
37
|
+
height: 100px;
|
|
38
|
+
width: 100%;
|
|
39
|
+
padding: 10px;
|
|
40
|
+
color: var(--bs-body-secondary-color);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.seatable-search-input .input-icon-addon {
|
|
44
|
+
z-index: 1;
|
|
45
|
+
pointer-events: auto;
|
|
46
|
+
min-width: 2.5rem !important;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.seatable-search-input .input-icon-addon svg {
|
|
50
|
+
color: #999;
|
|
51
|
+
cursor: pointer;
|
|
52
|
+
}
|
|
@@ -55,22 +55,6 @@ class DTableCustomizeSearchInput extends _react.Component {
|
|
|
55
55
|
this.inputRef.setSelectionRange(0, txtLength);
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
|
-
this.renderLeftIcon = () => {
|
|
59
|
-
const {
|
|
60
|
-
leftIcon,
|
|
61
|
-
leftIconClassName
|
|
62
|
-
} = this.props;
|
|
63
|
-
if (!leftIcon) return null;
|
|
64
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
65
|
-
className: (0, _classnames.default)('search-left-icon input-icon-addon', leftIconClassName),
|
|
66
|
-
style: {
|
|
67
|
-
fontSize: '12px'
|
|
68
|
-
},
|
|
69
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableIcon.default, {
|
|
70
|
-
symbol: leftIcon
|
|
71
|
-
})
|
|
72
|
-
});
|
|
73
|
-
};
|
|
74
58
|
this.renderClear = () => {
|
|
75
59
|
const {
|
|
76
60
|
isClearable,
|
|
@@ -125,21 +109,15 @@ class DTableCustomizeSearchInput extends _react.Component {
|
|
|
125
109
|
onKeyDown,
|
|
126
110
|
disabled = false,
|
|
127
111
|
style = {},
|
|
128
|
-
isClearable
|
|
129
|
-
leftIcon
|
|
112
|
+
isClearable
|
|
130
113
|
} = this.props;
|
|
131
114
|
const {
|
|
132
115
|
searchValue
|
|
133
116
|
} = this.state;
|
|
134
|
-
|
|
135
|
-
if (isClearable && searchValue) {
|
|
136
|
-
inputWidth = leftIcon ? 'calc(100% - 80px)' : 'calc(100% - 40px)';
|
|
137
|
-
} else if (leftIcon) {
|
|
138
|
-
inputWidth = 'calc(100% - 40px)';
|
|
139
|
-
}
|
|
117
|
+
const inputWidth = isClearable && searchValue ? 'calc(100% - 40px)' : '100%';
|
|
140
118
|
style.width = inputWidth;
|
|
141
119
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
142
|
-
children: [this.
|
|
120
|
+
children: [this.renderClear(), /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
143
121
|
type: "text",
|
|
144
122
|
name: "search-input",
|
|
145
123
|
value: searchValue,
|