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: Combo Option to add item at the top of the list #5270

Merged
merged 1 commit into from
Sep 29, 2022

Conversation

abasse
Copy link
Contributor

@abasse abasse commented Aug 30, 2022

Added a new option "addtotop" to the combo component to be able to add new items at the top.
Default is false.

{
  "type": "page",
  "body": {
    "type": "form",
    "debug": true,
    "mode": "horizontal",
    "api": "/api/mock2/form/saveForm",
    "body": [
      {
        "type": "combo",
        "name": "combo1",
        "label": "默认模式",
        "multiple": true,
        "addtotop": true,
        "items": [
          {
            "name": "text",
            "type": "input-text"
          }
        ]
      },
      {
        "type": "divider"
      },
      {
        "type": "combo",
        "name": "combo2",
        "label": "打平模式",
        "multiple": true,
        "addtotop": true,
        "flat": true,
        "items": [
          {
            "name": "text",
            "type": "input-text"
          }
        ]
      }
    ]
  }
}

@github-actions
Copy link

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

@github-actions github-actions bot added the feat label Aug 30, 2022
@nwind nwind merged commit fda1950 into baidu:master Sep 29, 2022
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.

None yet

2 participants