我想在我的应用程序中创建一个简单的搜索,但在关于它的互联网上找不到任何东西,这比2014年更新.必须有更好的方法.有startAt和endAt函数,但它们不能按预期工作,并且区分大小写.你们是如何解决这个问题的?2016年该功能如何仍然不存在?
我正在尝试在我的react应用程序中使用一个options数组,该数组使用react-select的形式以及选项存储在firebase集合中的位置。
当我使用带有键值对定义的选项数组来定义表单中的const时,所有这些都很好用,但是我正在努力找出如何用Firebase(Cloud Firestore)中存储的集合替换该数组。
在我的表单中,我目前有:
const options = [
{ value: "neurosciences", label: "Neurosciences - ABS 1109" },
{ value: "oncologyCarcinogenesis", label: "Oncology and Carcinogenesis - ABS 1112" },
{ value: "opticalPhysics", label: "Optical Physics - ABS 0205" },
{ value: "fisheriesSciences", label: "Fisheries Sciences - ABS 0704" },
{ value: "genetics", label: "Genetics - ABS 0604" },
{ value: "urbanRegionalPlanning", label: "Urban and Regional Planning - ABS 1205" }
];
Run Code Online (Sandbox Code Playgroud)
我想用数据库集合中文档标题的映射来替换此数组。
我数据库中的文档名称具有键,每个文档都有一个名为“ title”的字段。
在我的表单中,感谢我选择:
<div className="form-group">
<label htmlFor="fieldOfResearch">
Select your …Run Code Online (Sandbox Code Playgroud)