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

feat: Add default value support for table columns #4043

Merged
merged 17 commits into from
Oct 9, 2024

Conversation

ogabrielluiz
Copy link
Contributor

This pull request adds support for default values in table columns. The Column model now includes optional description and default fields. The default value can be inferred from the first row of data if available. Additionally, the TableNodeComponent now uses the default value when adding new rows.

@ogabrielluiz ogabrielluiz requested a review from anovazzi1 October 7, 2024 14:44
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Oct 7, 2024
@ogabrielluiz ogabrielluiz enabled auto-merge (squash) October 7, 2024 14:44
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Oct 7, 2024
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-4043.dmtpw4p5recq1.amplifyapp.com

Copy link
Contributor

github-actions bot commented Oct 8, 2024

Cannot auto-update because of conflicts.

@Cristhianzl Cristhianzl disabled auto-merge October 9, 2024 13:15
@Cristhianzl Cristhianzl enabled auto-merge (squash) October 9, 2024 13:17
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Oct 9, 2024
Copy link
Contributor

@anovazzi1 anovazzi1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 9, 2024
@Cristhianzl Cristhianzl merged commit 6515337 into main Oct 9, 2024
25 checks passed
@Cristhianzl Cristhianzl deleted the feat/add-default-table-input branch October 9, 2024 17:10
diogocabral pushed a commit to headlinevc/langflow that referenced this pull request Nov 26, 2024
* Add 'type', 'description', and 'default' fields to Table schema and enhance formatter validation

* Add type-based mapping to formatter validator in table schema

* Add default value support for new table rows in TableNodeComponent

* Add optional 'description' and 'default' fields to ColumnField interface

* Add default value inference for table columns in utils.ts

- Initialize 'default' property for table columns to null.
- Infer default value from the first row of data if available.
- Adjust column formatter determination based on sample value.

* Add default table input validation and update formatter logic in Column model

* Add unit tests for Column class in table schema module

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants