展开表格按钮显示错误的表格

我最近创建了一个包含几个表的帖子。第一个表看起来像这样:

Drug Example prescription(s) Feature(s)
abacavir 300 mg by mouth twice daily
600 mg by mouth once daily
Multiple templates for the same drug
abacavir / dolutegravir / lamivudine 1 tablet by mouth daily Combination drug
levonorgestrel One tablet by mouth as soon as possible within 72 hours of unprotected sexual intercourse or suspected contraceptive failure Free text dosing instructions
paracetamol 500 mg every 6 hours as needed for pain As needed dosing

有一些中间文字…

  • 列表
  • 其他
  • 内容

…然后是另一个(大)表,如下所示:

conceptdrugtemplate
Abacavir Abacavir 300 mg tablet
{
  dosingType: "org.openmrs.SimpleDosingInstructions",
  instructions: {
    dose: 300,
    doseUnits: "161553AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", /* mg */
    route: "160240AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", /* oral */
    frequency: "160858AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", /* twice daily */
  }
}
Abacavir Abacavir 300 mg tablet
{
  dosingType: "org.openmrs.SimpleDosingInstructions",
  instructions: {
    dose: 600,
    doseUnits: "161553AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", /* mg */
    route: "160240AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", /* oral */
    frequency: "160862AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", /* once daily */
  }
}
Abacavir / dolutegravir / lamivudine Abacavir/dolutegravir/lamivudine 600/50/300 tablet
{
  dosingType: "org.openmrs.SimpleDosingInstructions",
  instructions: {
    dose: 1,
    doseUnits: "1513AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", /* tablet */
    route: "160240AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", /* oral */
    frequency: "160862AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", /* once daily */
  }
}
Levonorgestrel Levonorgestrel 1.5 mg tablet
{
  dosingType: "org.openmrs.FreeTextDosingInstructions",
  instructions: {
    text: "One tablet by mouth as soon as possible within 72 hours of unprotected sexual intercourse or suspected contraceptive failure"
  }
}
Paracetamol Paracetamol 500 mg tablet
{
  dosingType: "org.openmrs.SimpleDosingInstructions",
  instructions: {
    dose: 500,
    doseUnits: "161553AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", /* mg */
    route: "160240AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", /* oral */
    frequency: "162249AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", /* every 6 hours */
    asNeeded: true,
    asNeededCondition: "pain"
  }
}
JSON 模板被裁剪了,无法水平滚动它们或表格。幸运的是,当鼠标悬停在第二个表上时,出现了时髦的“展开表”按钮。不幸的是,当我点击按钮展开第二个表时,它显示的是*第一个*表的展开视图。所以,我把表复制到这里的一个帖子里,看看是否能在元上重现这个问题。

果然。看起来同样的错误也在这里发生。也许问题出在第一个表是用 markdown 完成的,而第二个表是用 HTML 完成的(为了嵌入带有语法高亮的 JSON)。:confused:

3 个赞

我看到这里的 bug 了:

我们在这里进行了一个简单的查询选择器,所以它总是会选择帖子中的第一个表格。相反,它应该搜索点击按钮之后的第一个表格。

我们将在下个月的某个时候解决这个问题,感谢你提出。

7 个赞

此问题已根据 DEV: Update expand-table table query by janzenisaac · Pull Request #17347 · discourse/discourse · GitHub 修复。

预期的表格现在将打开 :slight_smile: 感谢您提出此问题!

4 个赞