dotvvm
dotvvm copied to clipboard
Business Pack ComboBox Server Search does not work
I am evaluating Business Pack controls with DotVVM 2. I tried "Server Search" functionality while following the documentation ("Sample 7: Server Search"). The problem is that the text being typed by the user is not transferred to ViewModel's Text property when the LoadItems command is invoked, so the server-side searching cannot be performed. Maybe I am missing something not mentioned in the sample in the doc?
Hi, the ComboBox is still a work in progress.
You can try to replace LoadItems="{staticCommand: LoadCountries(Text)}"
with LoadItems="{staticCommand: LoadCountries(text)}"
.
text
is not a property in a viewModel, it's a "temporary" variable which contains current text value even if the value is not yet commited to the viewModel property.
Hi Adam, the "text" workaround works, thanks. Please when can we expect the "RTM" version of Business Pack controls for DotVVM 2?
In addition, there is also a problem that the LoadItems command does not get called when the text gets empty (e.g. when the user deletes the last character). As a result, the content of drop-down list is the previous return value of LoadItems command. Is there a solution also for this problem?
We don't have any ETA for BusinessPack control release yet. Soon we will publicly share one.
Thank you for reporting the problem you described, it's fixed and it will be included in next preview release.
Great, thanks for fixing it.
I can confirm I have same problem. BussinessPack v 2.3.1.
@readcom Hi, there was an issue with the documentation regarding the server-side search feature of ComboBox. We have updated the sample as suggested by @adamjez. Can you please try it?