Update export options component structure and logic
This commit is contained in:
@@ -108,7 +108,9 @@ function targetFor(parameter: any): { arrangement?: number; session?: number } {
|
|||||||
|
|
||||||
function findSimplers(node: any, result: any[] = []): any[] {
|
function findSimplers(node: any, result: any[] = []): any[] {
|
||||||
if (Array.isArray(node)) {
|
if (Array.isArray(node)) {
|
||||||
node.forEach((item) => findSimplers(item, result));
|
node.forEach((item) => {
|
||||||
|
findSimplers(item, result);
|
||||||
|
});
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
if (!node || typeof node !== 'object') {
|
if (!node || typeof node !== 'object') {
|
||||||
@@ -117,7 +119,9 @@ function findSimplers(node: any, result: any[] = []): any[] {
|
|||||||
if (node.OriginalSimpler) {
|
if (node.OriginalSimpler) {
|
||||||
result.push(node.OriginalSimpler);
|
result.push(node.OriginalSimpler);
|
||||||
}
|
}
|
||||||
Object.values(node).forEach((value) => findSimplers(value, result));
|
Object.values(node).forEach((value) => {
|
||||||
|
findSimplers(value, result);
|
||||||
|
});
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -90,13 +90,13 @@ function ExportOptions({ disabled = false }: { disabled?: boolean }) {
|
|||||||
|
|
||||||
{format === 'ableton' && (
|
{format === 'ableton' && (
|
||||||
<>
|
<>
|
||||||
<label className="flex flex-col gap-1 mb-2">
|
<div className="flex flex-col gap-1 mb-2">
|
||||||
<span className="text-sm">Ableton Live version</span>
|
<span className="text-sm">Ableton Live version</span>
|
||||||
<SelectField name="abletonVersion" disabled={disabled} className="mr-auto">
|
<SelectField name="abletonVersion" disabled={disabled} className="mr-auto">
|
||||||
<option value="10">Live 10</option>
|
<option value="10">Live 10</option>
|
||||||
<option value="11">Live 11+</option>
|
<option value="11">Live 11+</option>
|
||||||
</SelectField>
|
</SelectField>
|
||||||
</label>
|
</div>
|
||||||
<CheckboxField
|
<CheckboxField
|
||||||
name="includeArchivedSamples"
|
name="includeArchivedSamples"
|
||||||
title="Include samples"
|
title="Include samples"
|
||||||
|
|||||||
Reference in New Issue
Block a user