mirror of
https://github.com/magnum-opus-tender-hack/frontend.git
synced 2024-11-22 00:06:35 +03:00
fix bugs
This commit is contained in:
parent
d44202eed4
commit
45202a31f0
|
@ -5,6 +5,5 @@ import { host } from "./consts"
|
||||||
export const fetcher = axios.create(
|
export const fetcher = axios.create(
|
||||||
{
|
{
|
||||||
baseURL: host,
|
baseURL: host,
|
||||||
timeout: 60000
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -51,14 +51,23 @@ export const Search: React.FC<{onData:(data:any)=>void}> = (props) =>{
|
||||||
setTags(tags.concat([tag]))
|
setTags(tags.concat([tag]))
|
||||||
}
|
}
|
||||||
|
|
||||||
const onSelect = (value:string, type:INode) =>{
|
const onSelect = (value:string, type:any) =>{
|
||||||
addTag(type)
|
const vts = value.split('--');
|
||||||
dispatch(createNode(type));
|
addTag({
|
||||||
|
'type': vts[1],
|
||||||
|
'value': vts[0]
|
||||||
|
})
|
||||||
|
|
||||||
|
dispatch(createNode({
|
||||||
|
'type': vts[1],
|
||||||
|
'value': vts[0]
|
||||||
|
}));
|
||||||
setAutoCompleteValue("")
|
setAutoCompleteValue("")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const onEnter = (value:any) => {
|
const onEnter = (value:any) => {
|
||||||
|
console.log(getNodes);
|
||||||
dispatch(
|
dispatch(
|
||||||
search(
|
search(
|
||||||
getNodes.concat(
|
getNodes.concat(
|
||||||
|
@ -100,7 +109,7 @@ export const Search: React.FC<{onData:(data:any)=>void}> = (props) =>{
|
||||||
{bold_str.toLocaleLowerCase () == autoCompleteValue.toLowerCase() ? <strong>{bold_str}</strong> : <span>{bold_str}</span>}
|
{bold_str.toLocaleLowerCase () == autoCompleteValue.toLowerCase() ? <strong>{bold_str}</strong> : <span>{bold_str}</span>}
|
||||||
<span>{after_str}</span>
|
<span>{after_str}</span>
|
||||||
</div>,
|
</div>,
|
||||||
value: e.value.value
|
value: e.value.value + '--' + e.value.type
|
||||||
}
|
}
|
||||||
})}
|
})}
|
||||||
onSelect={onSelect as any}
|
onSelect={onSelect as any}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user