-
Notifications
You must be signed in to change notification settings - Fork 102
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
chore(tree): make bhima-nav a component #179
chore(tree): make bhima-nav a component #179
Conversation
ad6a844
to
77ffba9
Compare
} | ||
|
||
function selectUnit(unit) { | ||
|
||
// Clear previous selection if it exists | ||
if (vm.selectedUnit) { | ||
vm.selectedUnit.selected = false; | ||
if ($ctrl.selectedUnit) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we must have one selected unit at a time, why not to do :
unit.selected = true;
$ctrl.selectedUnit = unit;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we must have one selected unit at a time, why not to do :
unit.selected = true;
$ctrl.selectedUnit = unit;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code does do what you suggest. See lines 85 and 86, right below this check. This if
statement is trying to make sure the previous unit.selected
is false.
Or am I misunderstanding?
This comment will not block the PR, however this PR needs a rebase. |
This commit migrates the `bhimaNav` directive to a component architecture. The navigation component is now called `bhNavigation` and has been migrated to the `components/` directory. One additional improvement has been implemented from #44. The tree now searches through all paths for a match to the current url on change using a `String.includes()` to search for matches. Credit to @sfount for this suggestion.
77ffba9
to
fe9edaf
Compare
@DedrickEnc, rebased. |
chore(tree): make bhima-nav a component
This commit fixes the cash registry filter bar to give greater visual surface area when there are no filters present on the page. Closes #179.
This commit fixes the cash registry filter bar to give greater visual surface area when there are no filters present on the page. Closes IMA-WorldHealth#179.
This commit migrates the
bhimaNav
directive to a componentarchitecture. The navigation component is now called
bhNavigation
andhas been migrated to the
components/
directory.One additional improvement has been implemented from #44. The tree now
searches through all paths for a match to the current url on change
using a
String.includes()
to search for matches. Credit to @sfountfor this suggestion.