Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 2 commits into from

Conversation

agi20dla
Copy link

@agi20dla agi20dla 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.

None yet

1 participant