Skip to content

Commit

Permalink
fix: 增加创建路由时标签搜索
Browse files Browse the repository at this point in the history
  • Loading branch information
tingfuyeh committed Oct 20, 2022
1 parent a7a470c commit f30caef
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default purify(function CustomRoutePage(props: DuckCmpProps<CreateDuck>)
const keyValidate = keyField.getTouched() && keyField.getError()
const labelList = [
...(keyField.getValue() ? [{ text: `(输入值)${keyField.getValue()}`, value: keyField.getValue() }] : []),
...filteredLabelList,
...filteredLabelList.filter((item) => item.text.indexOf(keyField.getValue()) > -1),
]
let keyComponent
if (labelType.getValue() === RoutingArgumentsType.CUSTOM || type === 'destination') {
Expand Down Expand Up @@ -149,7 +149,7 @@ export default purify(function CustomRoutePage(props: DuckCmpProps<CreateDuck>)
const valueOptions = labelList.find((item) => item.value === keyField.getValue())?.valueOptions || []
const options = [
...(valueField.getValue() ? [{ text: `(输入值)${valueField.getValue()}`, value: valueField.getValue() }] : []),
...valueOptions,
...valueOptions.filter((item) => item.text.indexOf(valueField.getValue()) > -1),
]
let valueComponent
if (labelType.getValue() === RoutingArgumentsType.CUSTOM || type === 'destination') {
Expand Down

0 comments on commit f30caef

Please sign in to comment.