pplonski commited on
Commit
03c8e75
·
1 Parent(s): a28865c

Upload dropdown bug.ipynb

Browse files
Files changed (1) hide show
  1. dropdown bug.ipynb +146 -0
dropdown bug.ipynb ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "id": "a53d11d9",
7
+ "metadata": {},
8
+ "outputs": [],
9
+ "source": [
10
+ "import mercury as mr"
11
+ ]
12
+ },
13
+ {
14
+ "cell_type": "code",
15
+ "execution_count": 2,
16
+ "id": "3142a78a",
17
+ "metadata": {},
18
+ "outputs": [],
19
+ "source": [
20
+ "counter = 0"
21
+ ]
22
+ },
23
+ {
24
+ "cell_type": "code",
25
+ "execution_count": 3,
26
+ "id": "8bab367e",
27
+ "metadata": {},
28
+ "outputs": [
29
+ {
30
+ "data": {
31
+ "application/mercury+json": "{\n \"widget\": \"Select\",\n \"value\": \"a\",\n \"choices\": [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"label\": \"\",\n \"model_id\": \"a7c71701e0944b70b44f13d6210e2a56\",\n \"code_uid\": \"Select.0.40.16.1-randd80902cc\",\n \"url_key\": \"\",\n \"disabled\": false,\n \"hidden\": false\n}",
32
+ "application/vnd.jupyter.widget-view+json": {
33
+ "model_id": "a7c71701e0944b70b44f13d6210e2a56",
34
+ "version_major": 2,
35
+ "version_minor": 0
36
+ },
37
+ "text/plain": [
38
+ "mercury.Select"
39
+ ]
40
+ },
41
+ "metadata": {},
42
+ "output_type": "display_data"
43
+ }
44
+ ],
45
+ "source": [
46
+ "d1 = mr.Select(value = \"a\", choices=[\"a\",\"b\",\"c\"])"
47
+ ]
48
+ },
49
+ {
50
+ "cell_type": "code",
51
+ "execution_count": 4,
52
+ "id": "b6f16a37",
53
+ "metadata": {},
54
+ "outputs": [
55
+ {
56
+ "name": "stdout",
57
+ "output_type": "stream",
58
+ "text": [
59
+ "Counter 0\n",
60
+ "Selection a\n"
61
+ ]
62
+ }
63
+ ],
64
+ "source": [
65
+ "print(f\"Counter {counter}\")\n",
66
+ "print(f\"Selection {d1.value}\")\n",
67
+ "counter += 1"
68
+ ]
69
+ },
70
+ {
71
+ "cell_type": "code",
72
+ "execution_count": 5,
73
+ "id": "3a6950ed",
74
+ "metadata": {},
75
+ "outputs": [
76
+ {
77
+ "data": {
78
+ "application/mercury+json": "{\n \"widget\": \"Select\",\n \"value\": \"BIG\",\n \"choices\": [\n \"small\",\n \"BIG\"\n ],\n \"label\": \"\",\n \"model_id\": \"5888d335978e48fd94ec92d526941827\",\n \"code_uid\": \"Select.0.40.16.1-randc7fe0bab\",\n \"url_key\": \"\",\n \"disabled\": false,\n \"hidden\": false\n}",
79
+ "application/vnd.jupyter.widget-view+json": {
80
+ "model_id": "5888d335978e48fd94ec92d526941827",
81
+ "version_major": 2,
82
+ "version_minor": 0
83
+ },
84
+ "text/plain": [
85
+ "mercury.Select"
86
+ ]
87
+ },
88
+ "metadata": {},
89
+ "output_type": "display_data"
90
+ }
91
+ ],
92
+ "source": [
93
+ "d2 = mr.Select(value = \"BIG\", choices=[\"small\", \"BIG\"])"
94
+ ]
95
+ },
96
+ {
97
+ "cell_type": "code",
98
+ "execution_count": 6,
99
+ "id": "2494b6df",
100
+ "metadata": {},
101
+ "outputs": [
102
+ {
103
+ "name": "stdout",
104
+ "output_type": "stream",
105
+ "text": [
106
+ "Counter 1\n",
107
+ "d2 selection BIG\n"
108
+ ]
109
+ }
110
+ ],
111
+ "source": [
112
+ "print(f\"Counter {counter}\")\n",
113
+ "print(f\"d2 selection {d2.value}\")"
114
+ ]
115
+ },
116
+ {
117
+ "cell_type": "code",
118
+ "execution_count": null,
119
+ "id": "a3367f2e",
120
+ "metadata": {},
121
+ "outputs": [],
122
+ "source": []
123
+ }
124
+ ],
125
+ "metadata": {
126
+ "kernelspec": {
127
+ "display_name": "menv",
128
+ "language": "python",
129
+ "name": "menv"
130
+ },
131
+ "language_info": {
132
+ "codemirror_mode": {
133
+ "name": "ipython",
134
+ "version": 3
135
+ },
136
+ "file_extension": ".py",
137
+ "mimetype": "text/x-python",
138
+ "name": "python",
139
+ "nbconvert_exporter": "python",
140
+ "pygments_lexer": "ipython3",
141
+ "version": "3.8.10"
142
+ }
143
+ },
144
+ "nbformat": 4,
145
+ "nbformat_minor": 5
146
+ }