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

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,5 +1,11 @@
1
1
  # @alicloud/console-components-search
2
2
 
3
+ ## 0.2.41-beta.0
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: 修复 SearchFilter 清除筛选条件入口被推到容器右侧的问题,恢复标签间距,支持清除入口随标签自然换行
8
+
3
9
  ## 0.2.40
4
10
 
5
11
  ### Patch Changes
@@ -180,6 +180,9 @@ const maxWidthDemoFilters = [
180
180
 
181
181
 
182
182
  const Demo1: React.FC<{}> = (props) => {
183
+ const [shortFilters, setShortFilters] = useState<any>([
184
+ { label: '模糊搜索', value: 'aaa', dataIndex: 'name' },
185
+ ]);
183
186
  const [filters, setFilters] = useState<any>([
184
187
  { label: '实例名称', value: 'xxxxxx', dataIndex: 'name' },
185
188
  { label: '超长搜索条件', value: 'search_filter_long_value_2026_08_18_should_only_truncate_the_value_part', dataIndex: 'longValue' },
@@ -242,6 +245,15 @@ const Demo1: React.FC<{}> = (props) => {
242
245
 
243
246
  />
244
247
 
248
+ <div style={{ marginTop: 8 }}>
249
+ <div>单个短值筛选条件</div>
250
+ <SearchFilter
251
+ dataSource={shortFilters}
252
+ onChange={(_, remainFilters) => setShortFilters(remainFilters)}
253
+ onClear={() => setShortFilters([])}
254
+ />
255
+ </div>
256
+
245
257
  <div style={{ marginTop: 8 }}>
246
258
  <div>tagValueMaxWidth 默认值</div>
247
259
  <SearchFilter
@@ -276,6 +288,7 @@ const Demo1: React.FC<{}> = (props) => {
276
288
  onChange={(deletedFilter, remainFilters) => {
277
289
  setFilters(remainFilters);
278
290
  }}
291
+ onClear={() => setFilters([])}
279
292
  />
280
293
  </div>
281
294
  </div>