Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default values for options and array types (frontend) #14635

Merged
merged 13 commits into from
Oct 3, 2024

Conversation

aptkingston
Copy link
Member

@aptkingston aptkingston commented Sep 24, 2024

Description

Few changes to default values, and some fixes around schema mutations when editing columns and primary display.

  • Adds default value setting for options type (renders a picker instead of a bindable text field, since it needs to be a valid option as the default value)
  • Adds default value setting for multi-select type (renders a multi-select picker instead of a bindable text field, since it needs to be a valid option as the default value)
  • Ensures that schema properties are consistent upon saving (e.g. required deletes any default value and vice versa)
  • Fixes an issue where you could set default value on primary display columns (as the logic for determining whether a field is required or not used an incorrect order of precedence)
  • Show default value setting as long as the feature is enabled, but disable it if it cannot be used
  • Ensures primary display columns are required and do not have default values when saving
  • When changing primary display via the grid, it now also mutates the schema to make the field required and have no default value. Before this, you were able to make any field the primary display column - meaning you could have non-required primary display columns which is not meant to be possible.

Single select:
image

Multi select:
image

Addresses:

@aptkingston aptkingston marked this pull request as ready for review September 24, 2024 14:09
@aptkingston aptkingston mentioned this pull request Oct 2, 2024
@aptkingston aptkingston requested a review from a team as a code owner October 2, 2024 09:50
@aptkingston aptkingston requested review from samwho and removed request for a team October 2, 2024 09:50
@github-actions github-actions bot added size/m and removed size/s labels Oct 2, 2024
packages/shared-core/src/table.ts Outdated Show resolved Hide resolved
packages/server/src/utilities/rowProcessor/index.ts Outdated Show resolved Hide resolved
@aptkingston aptkingston changed the title Default value changes and primary display schema fixes Default values for options and array types (frontend) Oct 2, 2024
@aptkingston aptkingston requested a review from samwho October 2, 2024 14:44
@aptkingston aptkingston merged commit ade2ed5 into v3-ui Oct 3, 2024
10 of 11 checks passed
@aptkingston aptkingston deleted the default-values-options branch October 3, 2024 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants