Álvaro Valenzuela Valdes commited on
Commit ·
a71b4cd
1
Parent(s): a66ed25
fix: resolve input locking issue and improve field reliability
Browse files
frontend/components/TenderSearch.tsx
CHANGED
|
@@ -43,7 +43,9 @@ export default function TenderSearch({ tenders, onSearch, onAnalyze, forceShowFo
|
|
| 43 |
}, [forceShowFollowed]);
|
| 44 |
|
| 45 |
useEffect(() => {
|
| 46 |
-
if (initialKeyword
|
|
|
|
|
|
|
| 47 |
}, [initialKeyword]);
|
| 48 |
|
| 49 |
useEffect(() => {
|
|
@@ -159,12 +161,14 @@ export default function TenderSearch({ tenders, onSearch, onAnalyze, forceShowFo
|
|
| 159 |
</div>
|
| 160 |
|
| 161 |
{!forceShowFollowed && (
|
| 162 |
-
<form onSubmit={handleSearch} className="grid grid-cols-1 md:grid-cols-4 gap-6 animate-in slide-in-from-top-4 duration-500">
|
| 163 |
|
| 164 |
<div className="space-y-2">
|
| 165 |
<label className="text-[10px] uppercase tracking-wider text-slate-500 font-bold px-1">Keyword</label>
|
| 166 |
<input
|
| 167 |
type="text"
|
|
|
|
|
|
|
| 168 |
placeholder="e.g. Software, Cloud..."
|
| 169 |
className="w-full bg-white/5 border border-white/10 rounded-xl px-4 py-3 text-white placeholder:text-slate-600 focus:outline-none focus:ring-2 focus:ring-purple-500/40 transition-all"
|
| 170 |
value={keyword}
|
|
@@ -175,6 +179,8 @@ export default function TenderSearch({ tenders, onSearch, onAnalyze, forceShowFo
|
|
| 175 |
<label className="text-[10px] uppercase tracking-wider text-slate-500 font-bold px-1">Buyer Code</label>
|
| 176 |
<input
|
| 177 |
type="text"
|
|
|
|
|
|
|
| 178 |
placeholder="e.g. 6945"
|
| 179 |
className="w-full bg-white/5 border border-white/10 rounded-xl px-4 py-3 text-white placeholder:text-slate-600 focus:outline-none focus:ring-2 focus:ring-purple-500/40 transition-all"
|
| 180 |
value={buyerCode}
|
|
|
|
| 43 |
}, [forceShowFollowed]);
|
| 44 |
|
| 45 |
useEffect(() => {
|
| 46 |
+
if (initialKeyword && initialKeyword !== keyword) {
|
| 47 |
+
setKeyword(initialKeyword);
|
| 48 |
+
}
|
| 49 |
}, [initialKeyword]);
|
| 50 |
|
| 51 |
useEffect(() => {
|
|
|
|
| 161 |
</div>
|
| 162 |
|
| 163 |
{!forceShowFollowed && (
|
| 164 |
+
<form onSubmit={handleSearch} className="relative z-10 grid grid-cols-1 md:grid-cols-4 gap-6 animate-in slide-in-from-top-4 duration-500">
|
| 165 |
|
| 166 |
<div className="space-y-2">
|
| 167 |
<label className="text-[10px] uppercase tracking-wider text-slate-500 font-bold px-1">Keyword</label>
|
| 168 |
<input
|
| 169 |
type="text"
|
| 170 |
+
name="keyword"
|
| 171 |
+
autoComplete="off"
|
| 172 |
placeholder="e.g. Software, Cloud..."
|
| 173 |
className="w-full bg-white/5 border border-white/10 rounded-xl px-4 py-3 text-white placeholder:text-slate-600 focus:outline-none focus:ring-2 focus:ring-purple-500/40 transition-all"
|
| 174 |
value={keyword}
|
|
|
|
| 179 |
<label className="text-[10px] uppercase tracking-wider text-slate-500 font-bold px-1">Buyer Code</label>
|
| 180 |
<input
|
| 181 |
type="text"
|
| 182 |
+
name="buyerCode"
|
| 183 |
+
autoComplete="off"
|
| 184 |
placeholder="e.g. 6945"
|
| 185 |
className="w-full bg-white/5 border border-white/10 rounded-xl px-4 py-3 text-white placeholder:text-slate-600 focus:outline-none focus:ring-2 focus:ring-purple-500/40 transition-all"
|
| 186 |
value={buyerCode}
|