fix: change is_active type from number to boolean to match API response
This commit is contained in:
parent
a75c9307d4
commit
4352732630
8 changed files with 14 additions and 14 deletions
|
|
@ -33,7 +33,7 @@ interface SpanLabelType {
|
|||
display_name: string;
|
||||
color: string;
|
||||
hotkey: string | null;
|
||||
is_active: number;
|
||||
is_active: boolean;
|
||||
sort_order: number;
|
||||
created_at: number;
|
||||
}
|
||||
|
|
@ -461,7 +461,7 @@ export default function SpanAnnotationManager({
|
|||
// Hotkey label assignment: only when span tool is active and a span range is selected (after first click)
|
||||
if (activeTool === 'span' && interactionState === 'first-click-done' && startCandle) {
|
||||
// Check if key matches any label hotkey
|
||||
const matchingLabel = spanLabelTypes.find((lt) => lt.hotkey === e.key && lt.is_active === 1);
|
||||
const matchingLabel = spanLabelTypes.find((lt) => lt.hotkey === e.key && lt.is_active);
|
||||
|
||||
if (matchingLabel && activeChartId) {
|
||||
e.preventDefault();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue