I create a button for visualize and put it on navigation bar
import { NavBarExtensionsRegistryProvider } from 'ui/registry/navbar_extensions';
import chrome from 'ui/chrome';
function visualizeControlProvider($http) {
return {
appName: 'visualize',
key: 'visualize-extra-button',
label: 'Extra',
run: (elm, prop) => {},
hideButton: false // This is the problem
};
}
NavBarExtensionsRegistryProvider.register(($http) => {
return visualizeControlProvider($http);
});
The issue is, I want to dynamically hide the button upon route changes. So I want to hide the button if it's on the grid list view of visualize while show the button when on edit/create mode.
Been trying to use $onRouteChanges, but didn't work
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.