Manuel Sánchez created ZEPPELIN-3102:
----------------------------------------

             Summary: Dynamic update of default value in dynamic forms
                 Key: ZEPPELIN-3102
                 URL: https://issues.apache.org/jira/browse/ZEPPELIN-3102
             Project: Zeppelin
          Issue Type: Bug
          Components: pySpark, python-interpreter, zeppelin-interpreter
    Affects Versions: 0.7.3
            Reporter: Manuel Sánchez


Hi, 

I was looking for a way to update dynamically the default value of a selectForm.
My code is the following:

        %spark2.pyspark
        d_var = {}
        d_var['one'] = ["0"]
        d_var['two'] = ["1"]

        keys = []
        values = [('0', 'True'), ('1', 'False')]
        for key in sorted(d_var.keys()):
                keys.append((key, key))

        key = z.select('Keys', keys, keys[0][0])
        default_value = '0' if key == 'one' else '1'
        print default_value
        value = z.select('Option', values, default_value)

When I change the selected value in the first select I expect that the second 
select will be updated but nothing happens, only in the first execution of the 
paragraph



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to