This repository was archived by the owner on Jul 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-12
lines changed
Expand file tree Collapse file tree 3 files changed +9
-12
lines changed Original file line number Diff line number Diff line change 11import { RowSelectOption } from "cdm/ComponentsModel" ;
22import { ColumnSettingsHandlerResponse } from "cdm/ModalsModel" ;
33import { randomColor , castStringtoHsl , castHslToString } from "helpers/Colors" ;
4+ import { satinizedColumnOption } from "helpers/FileManagement" ;
45import { ButtonComponent , Notice , Setting } from "obsidian" ;
56import { AbstractHandlerClass } from "patterns/chain/AbstractHandler" ;
67import { LOGGER } from "services/Logger" ;
@@ -53,7 +54,8 @@ export class SelectedColumnOptionsHandler extends AbstractHandlerClass<ColumnSet
5354 . setPlaceholder ( "label of option" )
5455 . setValue ( newLabel )
5556 . onChange ( async ( value : string ) : Promise < void > => {
56- newLabel = value ;
57+ newLabel = satinizedColumnOption ( value ) ;
58+ text . setValue ( newLabel ) ;
5759 } ) ;
5860 text . inputEl . onkeydown = ( e : KeyboardEvent ) => {
5961 switch ( e . key ) {
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import { DynamicInputType } from "helpers/Constants";
55import { t } from "lang/helpers" ;
66import { Setting } from "obsidian" ;
77import { AbstractHandlerClass } from "patterns/chain/AbstractHandler" ;
8- import { StringSuggest } from "settings/suggesters/StringSuggester" ;
98
109export class QuickOptionsColumnsHandler extends AbstractHandlerClass < AddColumnModalHandlerResponse > {
1110 settingTitle : string = "Column quick options" ;
@@ -68,14 +67,10 @@ export class QuickOptionsColumnsHandler extends AbstractHandlerClass<AddColumnMo
6867 if ( ! column . isMetadata ) {
6968 // Select type
7069 columnSetting
71- . addSearch ( cb => {
72- new StringSuggest (
73- cb . inputEl ,
74- typesRecord
75- ) ;
76- cb . setPlaceholder ( "Select type..." )
77- . setValue ( column . input )
78- . onChange ( selectTypeHandler ) ;
70+ . addDropdown ( ( dropdown ) => {
71+ dropdown . addOptions ( typesRecord ) ;
72+ dropdown . setValue ( DynamicInputType . TEXT ) ;
73+ dropdown . onChange ( selectTypeHandler ) ;
7974 } ) ;
8075 // Delete column
8176 columnSetting
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ class Parse {
3939 parsedLiteral = this . parseToEnableSorting ( wrapped , localSettings , isInline ) ;
4040 break ;
4141 case InputType . TAGS :
42- parsedLiteral = this . parseToOptionsArray ( wrapped , localSettings ) ;
42+ parsedLiteral = this . parseToOptionsArray ( wrapped ) ;
4343 break ;
4444 case InputType . CALENDAR :
4545 parsedLiteral = this . parseToCalendar ( wrapped , localSettings . date_format ) ;
@@ -345,7 +345,7 @@ class Parse {
345345 return `[${ stringArray } ]` ;
346346 }
347347
348- private parseToOptionsArray ( wrapped : WrappedLiteral , localSettings : LocalSettings ) : Literal {
348+ private parseToOptionsArray ( wrapped : WrappedLiteral ) : Literal {
349349 if ( wrapped . type !== 'array' ) {
350350 return wrapped . value . toString ( ) . split ( "," ) . map ( s => satinizedColumnOption ( s . toString ( ) . trim ( ) ) ) ;
351351 }
You can’t perform that action at this time.
0 commit comments