I have a fairly simple text field (TextField) on my site. When the user enters a value into it, a site search is performed.
I have a question related to the border color of this field. By default (if the field is not clickable) the border color is standard (black). When a user clicks on a field and enters a value, the field borders are blue. BUT after the value is entered into this field and the mouse clicks on any other part of the page, the borders of the field again become the standard color (black). BUT I would like to make it so that if there is any value in the field, the borders of the field would remain blue.
export default function Search({table}) {
const [input, setInput] = useState(filters.search[table])
return <Stack>
<TextField
value={input}
InputProps={{ endAdornment: (<CloseButton onClick={() => setInput("")} />) }}
onChange={(e) => { setInput(e.target.value) }} />
</Stack>
}
I understand that similar questions about the color of the border have been discussed many times, but in order to be able to choose the color of the border, if there is a value in the field, I have not seen such a solution