添加新事件后,无法选择文本框输入

问题描述 投票:0回答:1

我在 Angular 应用程序中使用 Syncfusion。创建事件后,除非单击手动添加的下拉列表,否则我无法再编辑事件编辑器中的任何字段。我将添加用于添加下拉列表的代码。

这里有一些注意事项:

  • 我正在使用正确的参数调用syncfusion的
    openEditor
  • 我已确保 2 个编辑器不会突然出现。
  • 我仔细检查了 CSS 属性,确保文本框已启用。
  • 我可以使用选项卡将光标放在文本框上,并可以从那里编辑值。在这里也可以保存作品。
  • 只有非文本项目是可编辑的。我可以单击日期选择器、颜色选择器等...只是我无法单击的文本。

奇怪的是,我以相同的方式添加多选下拉列表,并且不需要单击这些下拉列表即可访问编辑其他字段。

      // Driller
      let drillerElement: HTMLInputElement = args.element.querySelector(
        "#drillerInput"
      ) as HTMLInputElement;

      if (!drillerElement.classList.contains("e-dropdown")) {
        this.drillerDropdown = new DropDownList({
          placeholder: "Choose driller",
          value: eventData.UserResponsibleID,
          dataSource: this.peopleResources,
          fields: { text: "ResourceName", value: "UserID" },
          floatLabelType: "Auto",
        });

        this.drillerDropdown.query = this.getQueryForResources(
          this.getListOfAvailablePeople(
            eventData["StartTime"],
            eventData["EndTime"],
            eventData
          )
        );

        this.drillerDropdown.dataBind();
        this.drillerDropdown.appendTo(drillerElement);
        drillerElement.setAttribute("name", "UserResponsibleID");

        // Handle the change event to update the UserResponsibleID
        this.drillerDropdown.change = (args) => {
          eventData.UserResponsibleID = this.drillerDropdown.value as number;
        };
      }

我已经尝试更改对 openEditor 的调用,检查 CSS 样式,删除导致问题的下拉列表,并以不同的方式添加所述下拉列表。

html angular typescript syncfusion ejs-schedule
1个回答
0
投票

要解决此问题,请删除下面提到的行。如果问题仍然存在,您可以通过将下拉列表组件中的属性一一删除来检查。

this.drillerDropdown.query = this.getQueryForResources(
this.getListOfAvailablePeople(eventData["StartTime"], eventData["EndTime"],eventData));

示例: https://stackblitz.com/edit/drop-down-list-frxfxv?file=src%2Fapp.component.ts,package.json,src%2Fapp.module.ts,index.html

© www.soinside.com 2019 - 2024. All rights reserved.