yangdx
commited on
Commit
·
48f887a
1
Parent(s):
d1a56fa
Limit max edge size to 10
Browse files
lightrag_webui/src/components/graph/Settings.tsx
CHANGED
@@ -310,7 +310,7 @@ export default function Settings() {
|
|
310 |
}}
|
311 |
className="h-6 w-16 min-w-0 pr-1"
|
312 |
min={1}
|
313 |
-
max={maxEdgeSize}
|
314 |
/>
|
315 |
<span>-</span>
|
316 |
<Input
|
@@ -318,12 +318,13 @@ export default function Settings() {
|
|
318 |
value={maxEdgeSize}
|
319 |
onChange={(e) => {
|
320 |
const newValue = Number(e.target.value);
|
321 |
-
if (!isNaN(newValue) && newValue >= minEdgeSize && newValue >= 1) {
|
322 |
useSettingsStore.setState({ maxEdgeSize: newValue });
|
323 |
}
|
324 |
}}
|
325 |
className="h-6 w-16 min-w-0 pr-1"
|
326 |
min={minEdgeSize}
|
|
|
327 |
/>
|
328 |
</div>
|
329 |
</div>
|
|
|
310 |
}}
|
311 |
className="h-6 w-16 min-w-0 pr-1"
|
312 |
min={1}
|
313 |
+
max={Math.min(maxEdgeSize, 10)}
|
314 |
/>
|
315 |
<span>-</span>
|
316 |
<Input
|
|
|
318 |
value={maxEdgeSize}
|
319 |
onChange={(e) => {
|
320 |
const newValue = Number(e.target.value);
|
321 |
+
if (!isNaN(newValue) && newValue >= minEdgeSize && newValue >= 1 && newValue <= 10) {
|
322 |
useSettingsStore.setState({ maxEdgeSize: newValue });
|
323 |
}
|
324 |
}}
|
325 |
className="h-6 w-16 min-w-0 pr-1"
|
326 |
min={minEdgeSize}
|
327 |
+
max={10}
|
328 |
/>
|
329 |
</div>
|
330 |
</div>
|