Skip to content

Build your personal knowledge base with Trilium Notes

Revert "feat(options/advanced): add description for experimental"

Elian Doran673c39d798f2
diff --git a/apps/client/src/widgets/type_widgets/options/advanced.tsx b/apps/client/src/widgets/type_widgets/options/advanced.tsx
index c9d9b4a4ff..2959c5a1cc 100644
--- a/apps/client/src/widgets/type_widgets/options/advanced.tsx
+++ b/apps/client/src/widgets/type_widgets/options/advanced.tsx
@@ -191,7 +191,6 @@ function ExperimentalOptions() {
values={filteredExperimentalFeatures}
keyProperty="id"
titleProperty="name"
- descriptionProperty="description"
currentValue={enabledExperimentalFeatures} onChange={setEnabledExperimentalFeatures}
/>
</OptionsSection>
diff --git a/apps/client/src/widgets/type_widgets/options/components/CheckboxList.tsx b/apps/client/src/widgets/type_widgets/options/components/CheckboxList.tsx
index baa37baf5f..a2f48a04fd 100644
--- a/apps/client/src/widgets/type_widgets/options/components/CheckboxList.tsx
+++ b/apps/client/src/widgets/type_widgets/options/components/CheckboxList.tsx
@@ -1,17 +1,14 @@
-import FormCheckbox from "../../../react/FormCheckbox";
-
interface CheckboxListProps<T> {
values: T[];
keyProperty: keyof T;
titleProperty?: keyof T;
disabledProperty?: keyof T;
- descriptionProperty?: keyof T;
currentValue: string[];
onChange: (newValues: string[]) => void;
columnWidth?: string;
}
-export default function CheckboxList<T>({ values, keyProperty, titleProperty, disabledProperty, descriptionProperty, currentValue, onChange, columnWidth }: CheckboxListProps<T>) {
+export default function CheckboxList<T>({ values, keyProperty, titleProperty, disabledProperty, currentValue, onChange, columnWidth }: CheckboxListProps<T>) {
function toggleValue(value: string) {
if (currentValue.includes(value)) {
// Already there, needs removing.
@@ -25,17 +22,20 @@ export default function CheckboxList<T>({ values, keyProperty, titleProperty, di
return (
<ul style={{ listStyleType: "none", marginBottom: 0, columnWidth: columnWidth ?? "400px" }}>
{values.map(value => (
- <li key={String(value[keyProperty])}>
- <FormCheckbox
- label={String(value[titleProperty ?? keyProperty] ?? value[keyProperty])}
- name={String(value[keyProperty])}
- currentValue={currentValue.includes(String(value[keyProperty]))}
- disabled={!!(disabledProperty && value[disabledProperty])}
- hint={value && (descriptionProperty ? String(value[descriptionProperty]) : undefined)}
- onChange={() => toggleValue(String(value[keyProperty]))}
- />
+ <li>
+ <label className="tn-checkbox">
+ <input
+ type="checkbox"
+ className="form-check-input"
+ value={String(value[keyProperty])}
+ checked={currentValue.includes(String(value[keyProperty]))}
+ disabled={!!(disabledProperty && value[disabledProperty])}
+ onChange={e => toggleValue((e.target as HTMLInputElement).value)}
+ />
+ {String(value[titleProperty ?? keyProperty] ?? value[keyProperty])}
+ </label>
</li>
))}
</ul>
- );
-}
+ )
+}
\ No newline at end of file