@alicloud/console-components-search 0.2.40-beta.0 → 0.2.40

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/CHANGELOG.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # @alicloud/console-components-search
2
2
 
3
- ## 0.2.40-beta.0
3
+ ## 0.2.40
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - fix: SearchFilter 搜索条件较长时限制筛选标签宽度,并通过 Balloon 展示完整内容
7
+ - fix: SearchFilter 搜索条件较长时仅截断值内容,支持通过 tagValueMaxWidth 自定义值最大宽度
8
8
 
9
9
  ## 0.2.37
10
10
 
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019 Alibaba Cloud
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -172,10 +172,17 @@ const options3 = [
172
172
  },
173
173
  ];
174
174
 
175
+ const maxWidthDemoFilters = [
176
+ { label: '超长搜索条件', value: 'search_filter_long_value_2026_08_18_should_only_truncate_the_value_part', dataIndex: 'longValue' },
177
+ { label: '实例名称', value: 'xxxxxx', dataIndex: 'name' },
178
+ { value: [{ tagKey: 'test', tagValue: 'long_tag_value_2026_08_18_should_only_truncate_the_value_part' }], dataIndex: 'tag' },
179
+ ];
180
+
175
181
 
176
182
  const Demo1: React.FC<{}> = (props) => {
177
183
  const [filters, setFilters] = useState<any>([
178
184
  { label: '实例名称', value: 'xxxxxx', dataIndex: 'name' },
185
+ { label: '超长搜索条件', value: 'search_filter_long_value_2026_08_18_should_only_truncate_the_value_part', dataIndex: 'longValue' },
179
186
  { value: [{ tagKey: 'test', tagValue: '' }], dataIndex: 'tag' },
180
187
  { value: [{ tagKey: 'test', tagValue: '' }], dataIndex: 'tag2' },
181
188
  ]);
@@ -236,8 +243,36 @@ const Demo1: React.FC<{}> = (props) => {
236
243
  />
237
244
 
238
245
  <div style={{ marginTop: 8 }}>
246
+ <div>tagValueMaxWidth 默认值</div>
247
+ <SearchFilter
248
+ dataSource={maxWidthDemoFilters}
249
+ onChange={() => {}}
250
+ />
251
+ </div>
252
+
253
+ <div style={{ marginTop: 8 }}>
254
+ <div>tagValueMaxWidth=120</div>
255
+ <SearchFilter
256
+ dataSource={maxWidthDemoFilters}
257
+ tagValueMaxWidth={120}
258
+ onChange={() => {}}
259
+ />
260
+ </div>
261
+
262
+ <div style={{ marginTop: 8 }}>
263
+ <div>tagValueMaxWidth=360</div>
264
+ <SearchFilter
265
+ dataSource={maxWidthDemoFilters}
266
+ tagValueMaxWidth={360}
267
+ onChange={() => {}}
268
+ />
269
+ </div>
270
+
271
+ <div style={{ marginTop: 8 }}>
272
+ <div>可交互 SearchFilter</div>
239
273
  <SearchFilter
240
274
  dataSource={filters}
275
+ tagValueMaxWidth={220}
241
276
  onChange={(deletedFilter, remainFilters) => {
242
277
  setFilters(remainFilters);
243
278
  }}