Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
feat(attributes): enter the next value after the ones already taken
Elian Doran001423007677
diff --git a/apps/client/src/widgets/attribute_widgets/values_input.css b/apps/client/src/widgets/attribute_widgets/values_input.cssindex c39839b4a7..6c91b98f1a 100644--- a/apps/client/src/widgets/attribute_widgets/values_input.css+++ b/apps/client/src/widgets/attribute_widgets/values_input.css@@ -16,19 +16,12 @@/** A field whose values are entered through a widget the browser brings: a calendar, a clock, a colour- * dialog. The values share the field's line with the box they are entered in, and wrap onto the next- * once it is full, as they do for any other type — all that differs is which end the box sits at.+ * dialog. The values share the field's line with the box they are entered in, wrapping onto the next+ * once it is full, and the box follows them — where the next value is entered is after the ones+ * already taken, as in a field typed into.*/-.values-input.entry-leads {- /*- * The box leads and the values follow, rather than the other way about. Not for the reading of it:- * a box after a growing set of values moves along with every one taken, and a browser keeps the- * box being typed in in view by scrolling whatever it sits in — which in a table is the pane the- * rows scroll in, and scrolling that hands the row being edited back to be rendered afresh, editor- * and all. Kept at the head, it does not move, and nothing is scrolled.- */+.values-input.widget-entry {> .values-input-entry {- order: -1;display: flex;align-items: center;gap: 4px;diff --git a/apps/client/src/widgets/attribute_widgets/values_input.tsx b/apps/client/src/widgets/attribute_widgets/values_input.tsxindex 74f10fb8aa..b9575e42bc 100644--- a/apps/client/src/widgets/attribute_widgets/values_input.tsx+++ b/apps/client/src/widgets/attribute_widgets/values_input.tsx@@ -113,10 +113,9 @@ export default function ValuesInput({ labelType, values, onCommit, renderValue,}return (- // Values and the box they are entered in share the one wrapping line, however they are- // entered. Where a widget of the browser's own is what enters them, the box leads rather than- // follows — see below.- <div className={clsx("tn-field values-input", PICKED_TYPES.has(labelType) && "entry-leads")}>+ // Values and the box they are entered in share the one wrapping line, the box after them,+ // however they are entered — a widget of the browser's own only dresses the box differently.+ <div className={clsx("tn-field values-input", PICKED_TYPES.has(labelType) && "widget-entry")}>{values.map((value) => (<Chipkey={value}