interface
interface copied to clipboard
Weird default value behaviour
I have following schema:
export class Article {
// [...]
publishedAt = def.dateTimeColumn()
// [...]
}
Admin definition:
<DateField
field="publishedAt"
label="Published at"
dateFormat="d. M. yyyy"
defaultValue={new Date().toISOString()}
/>
Current behaviour
When editing entity which has publishedAt
set to null
administration shows the field filled with specified default value and save button is disabled. When the field is cleared, the save button is enabled and persists the default value.
Expected behaviour
a) After clearing the field, it shouldn't persist anything and the button should be disabled. b) Before clearing the field, the button shouldn't be disabled.
Admin version: 0.6.52