15 Commits
Author SHA1 Message Date
alamin-br 0060e07e9b fix(web-frontend): remove empty option from link-to-table dropdown in form view (#5571)
* fix(web-frontend): remove empty option from link-to-table dropdown in form view

The form-view link-row fields mount PaginatedDropdown without overriding
its `addEmptyItem` prop, which defaults to true with an empty display name.
That rendered a blank option at the top of the dropdown. Suppress it with
`:add-empty-item="false"` on both the single and multiple link-row form
components, matching the FormViewFieldSingleSelectRadios pattern (which
renders no empty option).

Closes #5549

* fix(backend): resolve PR feedback
2026-06-24 12:09:19 +02:00
alamin-br 0e1dc939e1 fix(web-frontend): Show unnamed row label for empty linked rows in form drop downs (#5469)
* fix(web-frontend): Show unnamed row label for empty linked rows in form
dropdowns

* fix: address reviewer comments on form link-row dropdown fix

* fix(web-frontend): keep required validation passing when user picks an
unnamed linked row

* fix(web-frontend): reset the cache to prevent it from growing
unboundedly

* fix(web-frontend): enforce required form validation at the field-type level

Required validation in the form submit path relied on each component's
isValid(), which the duration field overrides with a touched-based check.
An untouched empty required duration field therefore passed validation and
the form submitted an empty value the backend rejected.

Move the required check back to the field-type level via a new
isEmptyForRequiredValidation(), which defaults to isEmpty but lets link_row
use presence semantics (a picked row with an empty primary still counts as
filled) without changing isEmpty, so the conditional-visibility filters keep
treating that row as empty.

Also generalise PaginatedDropdown so valueName accepts a function and select()
emits the resolved item, which removes the fetchPage side effects (label
injection and the rowLookup copy) and lets the single and multiple link-row
components share a formViewLinkRowField mixin.

* fix(web-frontend): align link_row empty semantics with the backend

Replace isEmptyForRequiredValidation with a single isEmpty. A link_row is
a many-to-many relation, so the backend treats it as empty only when no row
is linked; the frontend's isEmpty was inheriting the base array check and
reporting a picked empty-primary row as empty. Make isEmpty selection-based
so the conditional-visibility filters and required form validation share one
definition that matches the backend.

* test(e2e): cover link_row behaviour on the public form

Add e2e tests for the public form link_row field: the "unnamed row" label
for empty-primary linked rows, an empty-primary pick revealing a
show-when-not-empty field, client-side blocking of a required empty field,
and a required link satisfied by an empty-primary row. Add form-view and
row fixtures and a FormPage page object to support them.

* refactor(web-frontend): tidy form link-row validation and row-value resolution

Collapse the duplicated requiredField branches in the multiple link-row
getValidationError into a single guard, document why it delegates to
baseField (not rowEditField) to avoid a double required check, and extract
the shared item/displayName resolution into resolveRowValue on the mixin so
the explanatory comment lives in one place.

No behaviour change; covered by existing form link-row unit tests.

* refactor(e2e): merge createTable helpers and fix link_row isEmpty semantics

Unify createTable/createTableWithData into a single createTable with an
optional data argument, and treat a link_row value as empty only when
every slot lacks a real id (some -> every), so a picked empty-primary
row counts as a real selection.

* fix(web-frontend): show required error for an untouched empty duration field

The duration field only computed its error message while the user typed, so
a required, untouched, empty field blocked form submission silently with no
visible error. Fall back to the field-type validation in the duration mixin's
getError so the required error renders on submit, and assert it in the e2e.

* refactor(web-frontend): drop redundant duration isValid override

isValid() now matches baseField's implementation exactly, and no
intermediate mixin defines it, so the override is dead weight.

* fix(web-frontend): guard duration form error slot with touched && !valid
2026-06-16 14:25:01 +02:00
716d43a9a8 Nuxt 3 migration (#4342)
Update the nuxt3 version.

Co-authored-by: Jonathan Adeline <jonathan@baserow.io>
Co-authored-by: Bram Wiepjes <bramw@protonmail.com>
Co-authored-by: Cezary <cezary@baserow.io>
Co-authored-by: Tsering Paljor <tsering@baserow.io>
Co-authored-by: Przemyslaw Kukulski <przemyslaw+gh@baserow.io>
Co-authored-by: Bram <bram2w@users.noreply.github.com>
2026-01-22 10:27:19 +01:00
Jonathan Adeline fb927e12ba Refactor dropdown component 2024-10-14 08:47:26 +00:00
Nigel Gott c055f1e468 Resolve "Fix form view link row conditions" 2023-09-05 15:24:50 +00:00
Bram Wiepjes 40b3c5d402 Resolve "Submit error with empty link_row field value in a publicly form" 2023-08-25 10:56:08 +00:00
Davide Silvestri 08dbae3a87 Resolve "Prefill link row display not working" 2023-08-22 07:16:56 +00:00
Davide Silvestri 52e1409095 Resolve "Mentions v2: mentions users in comments" 2023-07-06 12:06:04 +00:00
Bram Wiepjes 4f3d549cd9 Fix link row field lookup authorization bug with password protected view 2022-09-06 07:30:44 +00:00
Gaurang Tandon e58ddc9988 Fix lint 2022-08-23 22:26:14 +05:30
Gaurang Tandon 234804ae79 Accommodate empty string in link to table 2022-08-23 20:08:22 +05:30
Bram Wiepjes bb25b6edfe Resolve "Forms - Show field only when conditions are met" 2022-07-26 08:38:24 +00:00
Alexander Haller 4441aff78e Resolve "Prefill form values via query parameters" 2022-06-10 07:29:46 +00:00
Bram Wiepjes 54874601db Resolve "Add filter and sort to the publicly shared grid view" 2022-01-11 21:43:37 +00:00
Bram Wiepjes 53ffd8f9c0 Resolve "Form view" 2021-07-11 18:02:37 +00:00