Closed ChronosSF closed 3 weeks ago
There has been no recent activity and this issue has been marked inactive.
In continuation of this comment, the currently identified candidate properties are:
inputFormat
- could be part of the IFieldPipeArgs
interface; alternatively - defined on the column (i.e. editorInputFormat
or else); applicable for the date
, dateTime
and time
column types.inputMask
- also could be part of the IFieldPipeArgs
or else; applicable for string
and image
column data types as they both use the same template - a text input group. The igxMask
cannot be applied for number type inputs, so not applicable for number
, currency
and percent
types.Let me know what you think @ChronosSF, @rkaraivanov. @kacheshmarova could schedule a meeting to further discuss the specs.
To sum up the meeting discussion:
editorOptions
object would be exposed on the column and for now it would contain a single property - dateTimeFormat
(names to be further polished). This will be applied to the default editors of date
, time
and dateTime
columns.editorOptions.dateTimeFormat
config is not provided, we would try to infer the date/time inputFormat from the set pipeArgs.displayFormat
, if any. The condition for the displayFormat
to be applied as inputFormat
is that its date-time parts can be parsed as all numeric. If not, the editor’s inputFormat will fallback as per the grid’s locale (Note: currently it is a hardcoded default format for the dateTime
column type).
Is your feature request related to a problem? Please describe.
Currently every customization for the grid's default editors requires fully custom templates which however sometimes add complexity far beyond what the change calls for (e.g. having to handle change events and value assignments for simply wanting to change some display format)
Describe the solution you'd like
The column component can accept some objects based on pre-defined interfaces that it then uses to init its editors with the default templates.
Describe alternatives you've considered
n/a
Additional context
n/a