fix: Product form TypeScript and API errors
Fixed Issues: 1. TypeScript error on .indeterminate property (line 332) - Cast checkbox element to any for indeterminate access 2. API error handling for categories/tags endpoints - Added is_wp_error() checks - Return empty array on error instead of 500 Next: Implement modern tabbed product form (Shopify-style)
This commit is contained in:
@@ -329,7 +329,11 @@ export default function Products() {
|
||||
<th className="w-12 p-3">
|
||||
<Checkbox
|
||||
checked={allSelected}
|
||||
ref={(el) => el && (el.indeterminate = someSelected && !allSelected)}
|
||||
ref={(el) => {
|
||||
if (el) {
|
||||
(el as any).indeterminate = someSelected && !allSelected;
|
||||
}
|
||||
}}
|
||||
onCheckedChange={toggleAll}
|
||||
aria-label={__('Select all')}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user