mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Simple localization support and currency selector.
Summary: - Grist document has a associated "locale" setting that affects how currency is formatted. - Currency selector for number format. Test Plan: not done Reviewers: dsagal Reviewed By: dsagal Subscribers: paulfitz Differential Revision: https://phab.getgrist.com/D2977
This commit is contained in:
@@ -17,9 +17,8 @@ function AbstractWidget(field, opts = {}) {
|
||||
this.options = field.widgetOptionsJson;
|
||||
const {defaultTextColor = '#000000'} = opts;
|
||||
|
||||
this.valueFormatter = this.autoDispose(ko.computed(() => {
|
||||
return ValueFormatter.createFormatter(field.displayColModel().type(), this.options());
|
||||
}));
|
||||
this.valueFormatter = this.autoDispose(ko.computed(() =>
|
||||
ValueFormatter.createFormatter(field.displayColModel().type(), this.options(), field.documentSettings())));
|
||||
|
||||
this.textColor = Computed.create(this, (use) => use(this.field.textColor) || defaultTextColor)
|
||||
.onWrite((val) => this.field.textColor(val === defaultTextColor ? undefined : val));
|
||||
|
||||
Reference in New Issue
Block a user