mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
Query and Policy UI: Cursor placed at end of input field (#3224)
This commit is contained in:
parent
fde1da714b
commit
91a86ccee4
2 changed files with 30 additions and 0 deletions
|
|
@ -315,6 +315,12 @@ const PolicyForm = ({
|
|||
onChange={setLastEditedQueryName}
|
||||
inputOptions={{
|
||||
autoFocus: true,
|
||||
onFocus: (e: React.FocusEvent<HTMLInputElement>) => {
|
||||
// sets cursor to end of inputfield
|
||||
const val = e.target.value;
|
||||
e.target.value = "";
|
||||
e.target.value = val;
|
||||
},
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
|
@ -355,6 +361,12 @@ const PolicyForm = ({
|
|||
onChange={setLastEditedQueryDescription}
|
||||
inputOptions={{
|
||||
autoFocus: true,
|
||||
onFocus: (e: React.FocusEvent<HTMLInputElement>) => {
|
||||
// sets cursor to end of inputfield
|
||||
const val = e.target.value;
|
||||
e.target.value = "";
|
||||
e.target.value = val;
|
||||
},
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
|
@ -398,6 +410,12 @@ const PolicyForm = ({
|
|||
onChange={setLastEditedQueryResolution}
|
||||
inputOptions={{
|
||||
autoFocus: true,
|
||||
onFocus: (e: React.FocusEvent<HTMLInputElement>) => {
|
||||
// sets cursor to end of inputfield
|
||||
const val = e.target.value;
|
||||
e.target.value = "";
|
||||
e.target.value = val;
|
||||
},
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -307,6 +307,12 @@ const QueryForm = ({
|
|||
onChange={setLastEditedQueryName}
|
||||
inputOptions={{
|
||||
autoFocus: true,
|
||||
onFocus: (e: React.FocusEvent<HTMLInputElement>) => {
|
||||
// sets cursor to end of inputfield
|
||||
const val = e.target.value;
|
||||
e.target.value = "";
|
||||
e.target.value = val;
|
||||
},
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
|
@ -347,6 +353,12 @@ const QueryForm = ({
|
|||
onChange={setLastEditedQueryDescription}
|
||||
inputOptions={{
|
||||
autoFocus: true,
|
||||
onFocus: (e: React.FocusEvent<HTMLInputElement>) => {
|
||||
// sets cursor to end of inputfield
|
||||
const val = e.target.value;
|
||||
e.target.value = "";
|
||||
e.target.value = val;
|
||||
},
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue