added missing name attribute, fixed initial collections page load routing params persistence and removed unnecessery sub label required mark

This commit is contained in:
Gani Georgiev
2026-04-22 15:42:17 +03:00
parent 857214e10d
commit 866b8b8029
10 changed files with 30 additions and 27 deletions

View File

@@ -1,4 +1,4 @@
## v0.37.3 (WIP)
## v0.37.3
- Fixed 0 total count on page back/forward navigation.

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.3-dev"
PB_VERSION = "v0.37.3"

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
ui/dist/index.html vendored
View File

@@ -13,9 +13,9 @@
<!-- prism -->
<script src="./libs/prism/prism.js" data-manual></script>
<script type="module" crossorigin src="./assets/index-DutYB2pz.js"></script>
<script type="module" crossorigin src="./assets/index-CRAjAtnU.js"></script>
<link rel="modulepreload" crossorigin href="./assets/pocketbase.es-B_4DUNUU.js">
<link rel="stylesheet" crossorigin href="./assets/index-BiRi5YY3.css">
<link rel="stylesheet" crossorigin href="./assets/index-DWSRRo-V.css">
</head>
<body>
</body>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -62,13 +62,10 @@ export function pageCollections(route) {
(newVal, oldVal) => {
app.store.title = app.store.activeCollection?.name || "Collections";
// skip unnecessery initial params replacement
if (!oldVal) {
return;
}
const hasChanged = oldVal && oldVal != newVal;
// reset filter and sort params on collection change
if (oldVal != newVal) {
if (hasChanged) {
pageData.filter = "";
pageData.sort = "";
}
@@ -77,7 +74,7 @@ export function pageCollections(route) {
[COLLECTION_QUERY_KEY]: app.store.activeCollection?.name,
[FILTER_QUERY_KEY]: pageData.filter || null,
[SORT_QUERY_KEY]: pageData.sort || null,
}, newVal != oldVal ? true : null);
}, hasChanged ? true : null);
if (app.store.activeCollection?.id) {
window.localStorage.setItem(LAST_ACTIVE_STORAGE_KEY, app.store.activeCollection.id);

View File

@@ -229,6 +229,11 @@
&.record-field-view {
white-space: nowrap;
}
/* disable multiple unnecessery required marks */
&.record-field-input .field-list-item label::after {
content: none;
display: none;
}
}
.field-type-select {

View File

@@ -4,7 +4,7 @@
// record: undefined,
// field: undefined,
// }
export function input(data) {
export function input(props) {
const uniqueId = "select_" + app.utils.randomString();
return t.div(
@@ -14,33 +14,34 @@ export function input(data) {
t.label(
{ htmlFor: uniqueId },
t.i({ className: app.fieldTypes.select.icon, ariaHidden: true }),
t.span({ className: "txt" }, () => data.field.name),
t.span({ className: "txt" }, () => props.field.name),
),
app.components.select({
id: uniqueId,
max: () => data.field.maxSelect || 1,
required: () => data.field.required,
name: () => props.field.name,
max: () => props.field.maxSelect || 1,
required: () => props.field.required,
options: () => {
return data.field.values.map((v) => {
return props.field.values.map((v) => {
return { value: v };
});
},
value: () => {
return app.utils.toArray(data.record[data.field.name]);
return app.utils.toArray(props.record[props.field.name]);
},
onchange: (opts) => {
if (data.field.maxSelect <= 1) {
data.record[data.field.name] = opts?.[0]?.value || "";
if (props.field.maxSelect <= 1) {
props.record[props.field.name] = opts?.[0]?.value || "";
return;
}
data.record[data.field.name] = opts.map((o) => o.value);
props.record[props.field.name] = opts.map((o) => o.value);
},
}),
),
() => {
if (data.field.help) {
return t.div({ className: "field-help" }, data.field.help);
if (props.field.help) {
return t.div({ className: "field-help" }, props.field.help);
}
},
);