[#7646] fixed number field min/max input value normalization

This commit is contained in:
Gani Georgiev
2026-04-19 15:27:13 +03:00
parent 61ce760e0f
commit ba554b8470
6 changed files with 24 additions and 11 deletions

View File

@@ -1,6 +1,7 @@
## v0.37.1 (WIP)
## v0.37.1
- Minor UI fixes:
- Minor UI bugfixes:
- Fixed `number` field min/max input value normalization ([#7646](https://github.com/pocketbase/pocketbase/issues/7646)).
- Allow opening collections in new tab on middle click.
- Show collection name in the page title on initial load.

View File

@@ -11,4 +11,4 @@ PB_DOCS_URL = "https://pocketbase.io/docs"
PB_JS_SDK_URL = "https://github.com/pocketbase/js-sdk"
PB_DART_SDK_URL = "https://github.com/pocketbase/dart-sdk"
PB_RELEASES = "https://github.com/pocketbase/pocketbase/releases"
PB_VERSION = "v0.37.1-WIP"
PB_VERSION = "v0.37.1"

View File

File diff suppressed because one or more lines are too long

2
ui/dist/index.html vendored
View File

@@ -13,7 +13,7 @@
<!-- prism -->
<script src="./libs/prism/prism.js" data-manual></script>
<script type="module" crossorigin src="./assets/index-D8i1aGFh.js"></script>
<script type="module" crossorigin src="./assets/index-BMswcwK4.js"></script>
<link rel="modulepreload" crossorigin href="./assets/pocketbase.es-B_4DUNUU.js">
<link rel="stylesheet" crossorigin href="./assets/index-BLIFQr7L.css">
</head>

View File

@@ -25,7 +25,7 @@ export function input(props) {
min: () => props.field.min,
max: () => props.field.max,
value: () => props.record[props.field.name] || "",
oninput: (e) => (props.record[props.field.name] = Number(e.target.value)),
oninput: (e) => props.record[props.field.name] = Number(e.target.value),
}),
),
() => {

View File

@@ -21,8 +21,14 @@ export function settings(data) {
type: "text",
id: uniqueId + ".min",
name: () => `fields.${data.fieldIndex}.min`,
value: () => data.field.min || "",
oninput: (e) => (data.field.min = Number(e.target.value)),
value: () => typeof data.field.min == "number" ? data.field.min : "",
oninput: (e) => {
if (!e.target.value) {
data.field.min = null;
} else {
data.field.min = Number(e.target.value);
}
},
}),
),
),
@@ -36,8 +42,14 @@ export function settings(data) {
id: uniqueId + ".max",
min: () => data.field.min,
name: () => `fields.${data.fieldIndex}.max`,
value: () => data.field.max || "",
oninput: (e) => (data.field.max = Number(e.target.value)),
value: () => typeof data.field.max == "number" ? data.field.max : "",
oninput: (e) => {
if (!e.target.value) {
data.field.max = null;
} else {
data.field.max = Number(e.target.value);
}
},
}),
),
),