Skip to content

Only add expandable class for Objects and Arrays that have data to ex…#63

Closed
ghost wants to merge 2 commits intoawendland:masterfrom
logicalsoftware:master
Closed

Only add expandable class for Objects and Arrays that have data to ex…#63
ghost wants to merge 2 commits intoawendland:masterfrom
logicalsoftware:master

Conversation

@ghost
Copy link

@ghost ghost commented Jan 5, 2018

This change removes the expandable icon next to Objects and Arrays that do not have any data.

Description

This change is in line with the current documentation whereby it states, "The expanded state is different and contains further subnodes that are generated with ng-repeat: ". However, the current state of this directive displays the expandable even when there are no actual subnodes to display.

Motivation and Context

In an application we are using, we give users the option to see data in json format. However, any Object or Array is displayed with an expandable arrow, even if it doesn't have any data to expand. This causes clutter in the UI, and confusion for the user when no data is expanded.

How Has This Been Tested?

Only user testing was used as this is a very simple change. No automated tests were run.

Screenshots (if appropriate):

Types of changes

  • [X ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • [ X] My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • My change requires a change to the test suite.
  • I have written a test to cover the change.

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.

0 participants