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

FormType: form.SelectSingle bug. #66

Closed
bingochen87 opened this issue Oct 5, 2019 · 1 comment
Closed

FormType: form.SelectSingle bug. #66

bingochen87 opened this issue Oct 5, 2019 · 1 comment
Assignees
Labels
🐛bug Something isn't working
Projects
Milestone

Comments

@bingochen87
Copy link

bingochen87 commented Oct 5, 2019

{
			Head:     "状态",
			Field:    "state",
			TypeName: db.Varchar,
			Default:  "",
			Editable: true,
			FormType: form.SelectSingle,
			FilterFn: func(model types.RowModel) interface{} {
				return []string{model.Value}
			},
			Options: []map[string]string{
				{
					"field": "待审核",
					"value": common.WITHDRAWAL_STATE_WAIT_FOR_AUDIT,
				},{
					"field": "不通过",
					"value": common.WITHDRAWAL_STATE_UNAPPROVED,
				},
				{
					"field": "审核通过待转账",
					"value": common.WITHDRAWAL_STATE_WAIT_FOR_TX,
				},
				{
					"field": "转账失败",
					"value": common.WITHDRAWAL_STATE_TRANSFER_FAIL,
				},{
					"field": "审核通过",
					"value": common.WITHDRAWAL_STATE_APPROVED,
				},
				{
					"field": "转账失败,数据回滚",
					"value": common.WITHDRAWAL_STATE_ROLLBACK,
				},
			},
		}

Like the code above, set formType to form.SelectSingle. In theory, there should be only one specific option selected on the edit page, but on the selectBox on the page, there are sometimes two and sometimes three.

@chenhg5 chenhg5 self-assigned this Oct 5, 2019
@chenhg5 chenhg5 added the 🐛bug Something isn't working label Oct 5, 2019
@chenhg5 chenhg5 added this to the v0.1.0 milestone Oct 5, 2019
@bingochen87
Copy link
Author

fix at v0.2.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛bug Something isn't working
Projects
v1.0.0
  
Awaiting triage
Development

No branches or pull requests

2 participants