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 +21
-1
lines changed
components/modals/columnSettings/handlers/selects
stateManagement/columns/handlers Expand file tree Collapse file tree 3 files changed +21
-1
lines changed Original file line number Diff line number Diff line change 1- import { ColumnOption } from "cdm/ComponentsModel" ;
21import { ColumnSettingsHandlerResponse } from "cdm/ModalsModel" ;
32import { OptionSource } from "helpers/Constants" ;
43import { c } from "helpers/StylesHelper" ;
@@ -63,6 +62,14 @@ export class FormulaColumnOptionsHandler extends AbstractHandlerClass<ColumnSett
6362 } )
6463 ) ;
6564 // TODO Show column options read-only
65+ columnHandlerResponse . column . options . forEach ( ( option ) => {
66+ const optionEl = containerEl . createDiv ( ) ;
67+ optionEl . style . backgroundColor = option . color ;
68+ optionEl . addClass ( c ( "readable-options" ) ) ;
69+ optionEl . createDiv ( { text : option . label } ) ;
70+ optionEl . createDiv ( { text : option . value } ) ;
71+
72+ } ) ;
6673 }
6774 return this . goNext ( columnHandlerResponse ) ;
6875 }
Original file line number Diff line number Diff line change 11import { ColumnOption } from "cdm/ComponentsModel" ;
22import { TableColumn } from "cdm/FolderModel" ;
33import { ColumnsState , TableActionResponse } from "cdm/TableStateInterface" ;
4+ import { OptionSource } from "helpers/Constants" ;
45import { AbstractTableAction } from "stateManagement/AbstractTableAction" ;
56
67export default class AlterOptionToColumnHandlerAction extends AbstractTableAction < ColumnsState > {
@@ -10,6 +11,11 @@ export default class AlterOptionToColumnHandlerAction extends AbstractTableActio
1011 column : TableColumn ,
1112 option : ColumnOption
1213 ) => {
14+ if ( OptionSource . FORMULA === column . config . formula_option_source ) {
15+ // End the execution if the option is from a formula
16+ return ;
17+ }
18+
1319 const { value } = option ;
1420 // Wrap in a promise of a queue to avoid concurrency issues
1521 const columnIndex = get ( ) . columns . findIndex (
Original file line number Diff line number Diff line change @@ -773,6 +773,13 @@ div.database-plugin__td.data-input span:focus {
773773 margin-bottom : 10px ;
774774}
775775
776+ .database-plugin__readable-options {
777+ display : flex;
778+ flex-direction : row;
779+ gap : 0.5rem ;
780+ justify-content : center;
781+ }
782+
776783/**
777784* Row styles
778785*/
You can’t perform that action at this time.
0 commit comments