[#7646] fixed number field min/max input value normalization
This commit is contained in:
@@ -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.
|
- Allow opening collections in new tab on middle click.
|
||||||
- Show collection name in the page title on initial load.
|
- Show collection name in the page title on initial load.
|
||||||
|
|
||||||
|
|||||||
2
ui/.env
2
ui/.env
@@ -11,4 +11,4 @@ PB_DOCS_URL = "https://pocketbase.io/docs"
|
|||||||
PB_JS_SDK_URL = "https://github.com/pocketbase/js-sdk"
|
PB_JS_SDK_URL = "https://github.com/pocketbase/js-sdk"
|
||||||
PB_DART_SDK_URL = "https://github.com/pocketbase/dart-sdk"
|
PB_DART_SDK_URL = "https://github.com/pocketbase/dart-sdk"
|
||||||
PB_RELEASES = "https://github.com/pocketbase/pocketbase/releases"
|
PB_RELEASES = "https://github.com/pocketbase/pocketbase/releases"
|
||||||
PB_VERSION = "v0.37.1-WIP"
|
PB_VERSION = "v0.37.1"
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
2
ui/dist/index.html
vendored
2
ui/dist/index.html
vendored
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<!-- prism -->
|
<!-- prism -->
|
||||||
<script src="./libs/prism/prism.js" data-manual></script>
|
<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="modulepreload" crossorigin href="./assets/pocketbase.es-B_4DUNUU.js">
|
||||||
<link rel="stylesheet" crossorigin href="./assets/index-BLIFQr7L.css">
|
<link rel="stylesheet" crossorigin href="./assets/index-BLIFQr7L.css">
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export function input(props) {
|
|||||||
min: () => props.field.min,
|
min: () => props.field.min,
|
||||||
max: () => props.field.max,
|
max: () => props.field.max,
|
||||||
value: () => props.record[props.field.name] || "",
|
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),
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
() => {
|
() => {
|
||||||
|
|||||||
@@ -21,8 +21,14 @@ export function settings(data) {
|
|||||||
type: "text",
|
type: "text",
|
||||||
id: uniqueId + ".min",
|
id: uniqueId + ".min",
|
||||||
name: () => `fields.${data.fieldIndex}.min`,
|
name: () => `fields.${data.fieldIndex}.min`,
|
||||||
value: () => data.field.min || "",
|
value: () => typeof data.field.min == "number" ? data.field.min : "",
|
||||||
oninput: (e) => (data.field.min = Number(e.target.value)),
|
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",
|
id: uniqueId + ".max",
|
||||||
min: () => data.field.min,
|
min: () => data.field.min,
|
||||||
name: () => `fields.${data.fieldIndex}.max`,
|
name: () => `fields.${data.fieldIndex}.max`,
|
||||||
value: () => data.field.max || "",
|
value: () => typeof data.field.max == "number" ? data.field.max : "",
|
||||||
oninput: (e) => (data.field.max = Number(e.target.value)),
|
oninput: (e) => {
|
||||||
|
if (!e.target.value) {
|
||||||
|
data.field.max = null;
|
||||||
|
} else {
|
||||||
|
data.field.max = Number(e.target.value);
|
||||||
|
}
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user