django-json-widget
django-json-widget copied to clipboard
Editor working unproperly in TabularInline
- django-json-widget version: 2.0.1
- Django version: 5.0.6
- Python version: 3.12.4
- Operating System: Debian
Description
Hello! I am using this library in some projects, but I found a problem specifically when using in a Django admin.TabularInline.
class MyModelInLine(admin.TabularInline):
model = MyModel
extra = 0
verbose_name = _('MyModel')
verbose_name_plural = _('MyModels')
fields = (
'id_link', 'additional_information',
)
readonly_fields = (
'id_link',
)
formfield_overrides = {
models.JSONField: {'widget': JSONEditorWidget(height='350px', width='1000px')}
}
What I Did
Basically, when I open a new row in the Inline, it appears the widget, but I cannot modify it.
I can click, I can try to type but it doesn't work
Tried this in Chrome and Firefox and got the same results.
However, if it already has data, it is possible to modify
Thank you very much for reading, I hope you can replicate it :)