Skip to content

Commit

Permalink
fix: InputSelect only support lowercase alphabets #315
Browse files Browse the repository at this point in the history
  • Loading branch information
sunface committed Nov 4, 2023
1 parent ce10c52 commit f502cff
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ui/src/components/select/InputSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const InputSelect = ({ value,label, options, onChange, variant = "outline", cust
return options
}

return options.filter(o => (label !== null ? o.label : o.value).toLowerCase().indexOf(q) >= 0)
return options.filter(o => (label !== null ? o.label : o.value).toLowerCase().indexOf(q.toLowerCase()) >= 0)
}, [options, query])

const getBorderStyle = () => {
Expand All @@ -96,7 +96,7 @@ const InputSelect = ({ value,label, options, onChange, variant = "outline", cust
{/* <PopoverArrow /> */}
<PopoverBody p="0">
<Box>
<Input px="2" py="2" value={query} onChange={e => { setQuery(e.currentTarget.value.toLowerCase());if (!entered) {setEntered(true)} }} ref={ref} size={size} variant="unstyled" className="bordered-bottom" placeholder="input to search, press Enter to use current input" onKeyDown={e => {
<Input px="2" py="2" value={query} onChange={e => { setQuery(e.currentTarget.value);if (!entered) {setEntered(true)} }} ref={ref} size={size} variant="unstyled" className="bordered-bottom" placeholder="input to search, press Enter to use current input" onKeyDown={e => {
if (enableInput && e.key === 'Enter') {
onChange(query)
onToggle()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,17 @@ export const apiList = [{
name: "getServiceOperations",
desc: "get service operations",
params: `{
"service": "datav"
}`,
paramsDesc: [
...domainParams,
["service", "service name"]
],
format: DataFormat.ValueList
},
{
name: "getServiceRootOperations",
desc: "get service root span operations",
params: `{
}`,
paramsDesc: [
...domainParams,
Expand Down

0 comments on commit f502cff

Please sign in to comment.