kobaltedev / kobalte

A UI toolkit for building accessible web apps and design systems with SolidJS.
https://kobalte.netlify.app/
MIT License
1.3k stars 75 forks source link

How to combine use combobox component with solid resuource #261

Open army-u8 opened 1 year ago

army-u8 commented 1 year ago

I am using the combobox component but found that if the options backend data request comes back, the first loading component will report an error, and the solid resource has a state like a promise. If I want to display searching when the loading state, how should I set it? I seem to have tried It doesn’t seem to work at all. Can options set the initial value? Can you give me an example? Thanks

fabien-ml commented 1 year ago

Hi, thanks for reporting the issue.

I'm not sure to understand, do you want to provide the initial options to Combobox using data from a solid resource or perform the filtering on server like requested in #262 ?

army-u8 commented 1 year ago

Hi, thanks for reporting the issue.您好,感谢您报告问题。

I'm not sure to understand, do you want to provide the initial options to Combobox using data from a solid resource or perform the filtering on server like requested in #262 ?我不确定是否理解,您是否想使用来自固定资源的数据为 Combobox 提供初始选项,或者像 #262 中请求的那样在服务器上执行过滤?

I want to the first, The source of the options data is a solid resource ,because it takes time to request data. When the page is loaded for the first time, the data has not been requested back. The options are undefined. The component has read the options data and an error is reported. This can be used {data() || [ ]} To solve but there are also bugs,

MengLinMaker commented 3 weeks ago

@army-u8 A new Search component will be released soon.

Preview: https://deploy-preview-506--kobalte.netlify.app/docs/core/components/search/#usage

Is this the feature you were looking for?