Browse Source

HUE-8264 [frontend] The path on sqlContextPopover should be updatable

Enrico Berti 7 years ago
parent
commit
d8cdcecd8f
1 changed files with 2 additions and 3 deletions
  1. 2 3
      desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

+ 2 - 3
desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

@@ -2443,10 +2443,9 @@
    */
   ko.bindingHandlers.storageContextPopover = {
     init: function (element, valueAccessor, allBindings, viewModel, bindingContext) {
-      var options = valueAccessor();
       ko.bindingHandlers.click.init(element, function () {
         return function () {
-
+          var options = valueAccessor();
           AssistStorageEntry.getEntry(options.path, options.type).done(function (entry) {
             var $source = $(element);
             var offset = $source.offset();
@@ -2499,9 +2498,9 @@
    */
   ko.bindingHandlers.sqlContextPopover = {
     init: function (element, valueAccessor, allBindings, viewModel, bindingContext) {
-      var options = valueAccessor();
       ko.bindingHandlers.click.init(element, function () {
         return function () {
+          var options = valueAccessor();
           DataCatalog.getEntry({ sourceType: options.sourceType, path: options.path }).done(function (entry) {
             var $source = $(element);
             var offset = $source.offset();