如何在闪电输入中创建自定义查找字段,哪个获取用户名?

发布于 2025-01-26 12:47:13 字数 913 浏览 5 评论 0原文

我想在不使用Lightning-Edit Record-Form的情况下创建自定义查找字段。 通知何时完成=查找(用户), 它没有获取用户名。这是我编码的内容:

<lightning-input

              class="requiredfield"
              type="search"
              name="notifyToWhenCompleted"
              variant="label-hidden"
              placeholder="Search Users" 
              value={userName}
              onchange={myLookupHandle} onkeydown={searchHandleClick} onclick={searchHandleClick}
              style="padding-bottom:20px; width:275px; font-weight:normal; color:#424345;">
             </lightning-input>

JS
myLookupHandle(event){
   console.log(event.detail);
   this.milestoneId = event.detail;
   this.userName = event.target.value;
}
 searchHandleClick(event){
    this.isShowResult = true;
    this.messageResult = false;
 }
  
  searchHandleKeyChange(event){
   this.messageResult=false;
   this.userName = event.target.value;
 }

I want to create custom lookup field without using lightning-edit-record-form.
Notify to when completed = lookup(users),
its not fetching the users name. Here is what I coded:

<lightning-input

              class="requiredfield"
              type="search"
              name="notifyToWhenCompleted"
              variant="label-hidden"
              placeholder="Search Users" 
              value={userName}
              onchange={myLookupHandle} onkeydown={searchHandleClick} onclick={searchHandleClick}
              style="padding-bottom:20px; width:275px; font-weight:normal; color:#424345;">
             </lightning-input>

JS
myLookupHandle(event){
   console.log(event.detail);
   this.milestoneId = event.detail;
   this.userName = event.target.value;
}
 searchHandleClick(event){
    this.isShowResult = true;
    this.messageResult = false;
 }
  
  searchHandleKeyChange(event){
   this.messageResult=false;
   this.userName = event.target.value;
 }

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文