added missing name attribute, fixed initial collections page load routing params persistence and removed unnecessery sub label required mark
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
## v0.37.3 (WIP)
|
## v0.37.3
|
||||||
|
|
||||||
- Fixed 0 total count on page back/forward navigation.
|
- Fixed 0 total count on page back/forward navigation.
|
||||||
|
|
||||||
|
|||||||
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.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
4
ui/dist/index.html
vendored
@@ -13,9 +13,9 @@
|
|||||||
|
|
||||||
<!-- 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-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="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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -62,13 +62,10 @@ export function pageCollections(route) {
|
|||||||
(newVal, oldVal) => {
|
(newVal, oldVal) => {
|
||||||
app.store.title = app.store.activeCollection?.name || "Collections";
|
app.store.title = app.store.activeCollection?.name || "Collections";
|
||||||
|
|
||||||
// skip unnecessery initial params replacement
|
const hasChanged = oldVal && oldVal != newVal;
|
||||||
if (!oldVal) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// reset filter and sort params on collection change
|
// reset filter and sort params on collection change
|
||||||
if (oldVal != newVal) {
|
if (hasChanged) {
|
||||||
pageData.filter = "";
|
pageData.filter = "";
|
||||||
pageData.sort = "";
|
pageData.sort = "";
|
||||||
}
|
}
|
||||||
@@ -77,7 +74,7 @@ export function pageCollections(route) {
|
|||||||
[COLLECTION_QUERY_KEY]: app.store.activeCollection?.name,
|
[COLLECTION_QUERY_KEY]: app.store.activeCollection?.name,
|
||||||
[FILTER_QUERY_KEY]: pageData.filter || null,
|
[FILTER_QUERY_KEY]: pageData.filter || null,
|
||||||
[SORT_QUERY_KEY]: pageData.sort || null,
|
[SORT_QUERY_KEY]: pageData.sort || null,
|
||||||
}, newVal != oldVal ? true : null);
|
}, hasChanged ? true : null);
|
||||||
|
|
||||||
if (app.store.activeCollection?.id) {
|
if (app.store.activeCollection?.id) {
|
||||||
window.localStorage.setItem(LAST_ACTIVE_STORAGE_KEY, app.store.activeCollection.id);
|
window.localStorage.setItem(LAST_ACTIVE_STORAGE_KEY, app.store.activeCollection.id);
|
||||||
|
|||||||
@@ -229,6 +229,11 @@
|
|||||||
&.record-field-view {
|
&.record-field-view {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
/* disable multiple unnecessery required marks */
|
||||||
|
&.record-field-input .field-list-item label::after {
|
||||||
|
content: none;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.field-type-select {
|
.field-type-select {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
// record: undefined,
|
// record: undefined,
|
||||||
// field: undefined,
|
// field: undefined,
|
||||||
// }
|
// }
|
||||||
export function input(data) {
|
export function input(props) {
|
||||||
const uniqueId = "select_" + app.utils.randomString();
|
const uniqueId = "select_" + app.utils.randomString();
|
||||||
|
|
||||||
return t.div(
|
return t.div(
|
||||||
@@ -14,33 +14,34 @@ export function input(data) {
|
|||||||
t.label(
|
t.label(
|
||||||
{ htmlFor: uniqueId },
|
{ htmlFor: uniqueId },
|
||||||
t.i({ className: app.fieldTypes.select.icon, ariaHidden: true }),
|
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({
|
app.components.select({
|
||||||
id: uniqueId,
|
id: uniqueId,
|
||||||
max: () => data.field.maxSelect || 1,
|
name: () => props.field.name,
|
||||||
required: () => data.field.required,
|
max: () => props.field.maxSelect || 1,
|
||||||
|
required: () => props.field.required,
|
||||||
options: () => {
|
options: () => {
|
||||||
return data.field.values.map((v) => {
|
return props.field.values.map((v) => {
|
||||||
return { value: v };
|
return { value: v };
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
value: () => {
|
value: () => {
|
||||||
return app.utils.toArray(data.record[data.field.name]);
|
return app.utils.toArray(props.record[props.field.name]);
|
||||||
},
|
},
|
||||||
onchange: (opts) => {
|
onchange: (opts) => {
|
||||||
if (data.field.maxSelect <= 1) {
|
if (props.field.maxSelect <= 1) {
|
||||||
data.record[data.field.name] = opts?.[0]?.value || "";
|
props.record[props.field.name] = opts?.[0]?.value || "";
|
||||||
return;
|
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) {
|
if (props.field.help) {
|
||||||
return t.div({ className: "field-help" }, data.field.help);
|
return t.div({ className: "field-help" }, props.field.help);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user