- Notifications
You must be signed in to change notification settings - Fork279
Add Select (dropdown) column type to tables#602
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
netlifybot commentedDec 31, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
|
Name | Link |
---|---|
🔨 Latest commit | 1cd00c2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thank you million times! What a valuable contribution!
👷 Deploy request forlowcoder-test pending review.Visit the deploys page to approve it
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thank you very much for this valuable contribution!!
Uh oh!
There was an error while loading.Please reload this page.
Hello! I've been playing around with Lowcoder, and I wanted to have dropdowns in editable table columns, as requested in#412. I couldn't find it, so I quickly threw this together.
Let me know if any more changes are needed! I tried to touch similar files to those touched byd92f917, which added the Number column type, so hopefully not too many things have been forgotten.
Proposed changes
This PR adds a new Select column type to tables. It's specifically intended to allow inline edits to present a dropdown so users get some guidance on the allowed values, instead of a simple text field.
Example: the following screenshots show a Table component with its standard data (10 users with an ID, name, date and department). However, the Department column (which is usually a Text column) has been changed to a Select column and marked as Editable:
When editing a user's Department (by double-clicking that cell), it transforms into a dropdown:
Of course, clicking on the dropdown displays the available choices:
Once a different choice has been selected (and the cell unfocused), the cell is marked as having pending changes:
Saving the table emits an event which has the changed cell as part of the table's
changeSet
, where it would be handled as any other change. This notification is triggered on the Save Changes event of the table, and it prints{{table.changeSet}}
:Types of changes
Checklist