You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug was identified and initially discussed in #1365 (comment) on pull request #1365.
Expected behavior
When loading a schema with empty initial data for an array, and when disable_array_delete_all_rows and disable_array_delete_last_row options are set, the "delete all rows" and "delete last row" buttons should not be visible. The users should not be able to see or interact with these buttons, as it was before the introduction of pull request #1365.
Actual behavior
Currently, with the given commit 47ee520 from pull request #1365, when the editor loads a schema with empty initial data for an array, the "delete all rows" and "delete last row" buttons are always visible, regardless of the disable_array_delete_all_rows and disable_array_delete_last_row options. This is contrary to the expected behavior. Additionally, performing actions like adding and removing a row causes the buttons to disappear, which is also a strange behavior. Reverting the mentioned commit seems to fix this issue.
Load the editor with the following schema having empty initial data for the array.
{"$schema": "http://json-schema.org/draft-07/schema#","type": "object","properties": {"my_boolean": {"title": "My Boolean","format": "checkbox","type": "boolean","default": false},"my_array": {"type": "array","title": "My Array","items": {"title": "Item","type": "string"}}}}
Observe that the "delete all rows" and "delete last row" buttons are visible even if the disable_array_delete_all_rows and disable_array_delete_last_row options are set.
Add and remove a row, then notice that the buttons disappear.
For reference, a jsfiddle has been created demonstrating the actual behavior using the mentioned commit: https://jsfiddle.net/ubd873cn/
The official playground could not be used to showcase this behavior as the bug-introducing change has not been released yet.
The text was updated successfully, but these errors were encountered:
General information
This bug was identified and initially discussed in #1365 (comment) on pull request #1365.
Expected behavior
When loading a schema with empty initial data for an array, and when
disable_array_delete_all_rows
anddisable_array_delete_last_row
options are set, the "delete all rows" and "delete last row" buttons should not be visible. The users should not be able to see or interact with these buttons, as it was before the introduction of pull request #1365.Actual behavior
Currently, with the given commit 47ee520 from pull request #1365, when the editor loads a schema with empty initial data for an array, the "delete all rows" and "delete last row" buttons are always visible, regardless of the
disable_array_delete_all_rows
anddisable_array_delete_last_row
options. This is contrary to the expected behavior. Additionally, performing actions like adding and removing a row causes the buttons to disappear, which is also a strange behavior. Reverting the mentioned commit seems to fix this issue.Steps to reproduce the behavior
disable_array_delete_all_rows
anddisable_array_delete_last_row
options are set.For reference, a jsfiddle has been created demonstrating the actual behavior using the mentioned commit: https://jsfiddle.net/ubd873cn/
The official playground could not be used to showcase this behavior as the bug-introducing change has not been released yet.
The text was updated successfully, but these errors were encountered: