keystonejs / keystonejs/keystone

When defaultFieldMode: 'read' is set, nulled values are not distinguishable from empty strings.

Open
#6,886 0 comments 0 reactions 1 assignee Claimed by @dcousens View on GitHub
Dominant language
TypeScript
Stars
10k
Forks
1.3k
Avg merge
19h 14m
Merged PRs (30d)
19

Description

If a field is set to `text({ db: { isNullable: true } }),` and for the schema `itemView: { defaultFieldMode: 'read', },` is active, then the view does not make it clear, if en empty string is set or `null`.

Bildschirmfoto 2021-11-04 um 11 18 58

if `defaultFieldMode` is not set to `read`, then you see if the value is actually `null`:

Bildschirmfoto 2021-11-04 um 11 19 57

Expected behaviour: Show `null` if `null` is in the database.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.