mirror of
https://github.com/usebruno/bruno.git
synced 2025-06-25 06:21:57 +02:00
feat: add response filter placeholder (#1293)
This commit is contained in:
parent
969c44023f
commit
acc646a05d
@ -15,6 +15,18 @@ const QueryResultFilter = ({ onChange, mode }) => {
|
|||||||
return null;
|
return null;
|
||||||
}, [mode]);
|
}, [mode]);
|
||||||
|
|
||||||
|
const placeholderText = useMemo(() => {
|
||||||
|
if (mode.includes('json')) {
|
||||||
|
return '$.store.books..author';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mode.includes('xml')) {
|
||||||
|
return '/store/books//author';
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}, [mode]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={'response-filter relative'}>
|
<div className={'response-filter relative'}>
|
||||||
<div className="absolute inset-y-0 left-0 pl-4 flex items-center">
|
<div className="absolute inset-y-0 left-0 pl-4 flex items-center">
|
||||||
@ -29,6 +41,7 @@ const QueryResultFilter = ({ onChange, mode }) => {
|
|||||||
type="text"
|
type="text"
|
||||||
name="response-filter"
|
name="response-filter"
|
||||||
id="response-filter"
|
id="response-filter"
|
||||||
|
placeholder={placeholderText}
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
autoCorrect="off"
|
autoCorrect="off"
|
||||||
autoCapitalize="off"
|
autoCapitalize="off"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user