You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
form select: loose equality testing for option values
the form component now considers numbers and their string representation as equal when comparing the `value` parameter and the values from the `options` parameter in dropdowns
see #1002
Copy file name to clipboardExpand all lines: CHANGELOG.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,16 @@
22
22
```
23
23
- When a sql file is saved with the wrong character encoding (not UTF8), SQLPage now displays a helpful error messages that points to exactly wherein the file the problem is.
24
24
- More visual error messages: errors that occured before (such as file access issues) used to generate plain text messages that looked scary to non-technical users. All errors are now displayed nicely in the browser.
25
+
- The form component now considers numbers and their string representation as equal when comparing the `value` parameter and the valuesfrom the `options` parameter in dropdowns. This makes it easier to use variables (which are always strings) in the value parameter in order to preserve a dropdown field value across page reloads. The following is now valid:
26
+
-```sql
27
+
select 'form' as component;
28
+
select
29
+
'select' as type,
30
+
true as create_new,
31
+
true as dropdown,
32
+
'2' as value, -- passed as text even if the option values are passed as integers
33
+
'[{"label": "A", "value": 1}, {"label": "B", "value": 2}]' as options;
0 commit comments