Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(plugin-formula): fix read-pretty component when used in association field #1957

Merged
merged 1 commit into from
May 30, 2023

Conversation

mytharcher
Copy link
Contributor

Description (Bug 描述)

公式字段在表格中展示时间格式有误,未按照 DatePicker 组件的格式展示。

公式日期字段,只选择了日期格式,没有选时间,刚升级版本后就这样了

image

Steps to reproduce (复现步骤)

  1. 公式字段选择存储类型为 Datetime,格式为“年-月-日”。
  2. 表达式填入“创建时间”变量。
  3. 在表格中插入数据。
  4. 查看公式结果列。

Expected behavior (预期行为)

按照选择的时间格式展示。

Actual behavior (实际行为)

未按照 DatePicker 组件的格式展示。

Related issues (相关 issue)

#1911 #1805

Reason (原因)

#1911 中修改了 Formula.Result 组件的 read-pretty 格式引入。

Solution (解决方案)

恢复到 #1911 之前,但为解决 #1805,重新处理关系字段的配置读取问题。

其他影响

由于当前表格的关系字段展示选择标题列未对任意组件适配,所以暂时不支持从关系字段展示关系数据标题列为公式的结果组件渲染优化,会造成以此种方式展示日期类型公式结果时显示为 ISOString。但可以通过直接引用关系字段的字段绕过,可正常显示。

相关代码未来需要改进:

@mytharcher mytharcher merged commit cf4e91b into main May 30, 2023
4 checks passed
@mytharcher mytharcher deleted the fix/plugin-formula-readpretty branch May 30, 2023 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant