我需要知道当我在 TextField 中输入字母时如何过滤 JavaFX 中 ListView 中的项目。我尝试在不同谷歌链接的帮助下使用 FilteredList 但没有得到结果。为了澄清这一点,我发布了一张我想要的功能的图片。谢谢!
以下是用户集合的架构:
const Mongoose = require('mongoose')
const Schema = Mongoose.Schema
const userSchema = new Schema({
name: {
type: String,
required: true
},
email: {
type: String,
required: true
},
password: {
type: String
},
supporterOf: [{
type: Schema.Types.ObjectId,
ref: 'individual',
required: false
}],
})
module.exports = Mongoose.model('user', userSchema);
Run Code Online (Sandbox Code Playgroud)
我想填充“supporterOf”,它是个人的集合(参考:个人)。'supporterOf' 包含一个 ObjectId 数组。我遇到了将特定 objectId 与该 ObjectId 数组匹配的问题。谁能建议我如何将特定的 ObjectId 与填充函数中的 ObjectIds 数组匹配?