smartxworks / sunmao-ui

A Framework for Developing Low-code Tool
https://sunmao-ui.com
Apache License 2.0
1.38k stars 94 forks source link

refactor(ComponentSearch): remove choc-ui and replace it with select #697

Closed xzdry closed 1 year ago

xzdry commented 1 year ago

Replace the choc-ui autocomplete component with the select (based on rc-select) provided by editor-sdk and remove the choc-ui package

Problems with choc-ui autocomplete include

  1. performance not good, when there are many options there is a performance impact, when the page is refreshed or when the options item is switched up or down, all options items are re-rendered
  2. the default filter is not friendly enough (can be solved by adding a filter function, but performance is not good, see 1)
  3. sometimes the dropdown box will not pop up (no idea why at the moment)

This is a comparison between using choc-ui autocomplete and select(with the addition of the filter function):
choc autocomplete component-search-choc

select

component-search

Normal use comparison: component-search-compare