From 877b98a68a6fddcfb0035921c526e3d72d35c243 Mon Sep 17 00:00:00 2001 From: Raven Date: Sun, 15 Mar 2020 10:20:00 +0800 Subject: [PATCH] Add ForSerializedObject bool to SelectOneConfig and SelectManyConfig. Just add this field to have the ability to support serialized object for selector by customizing template. --- meta_select_many.go | 1 + meta_select_one.go | 1 + 2 files changed, 2 insertions(+) diff --git a/meta_select_many.go b/meta_select_many.go index 4f26a418..c3474114 100644 --- a/meta_select_many.go +++ b/meta_select_many.go @@ -19,6 +19,7 @@ type SelectManyConfig struct { SelectMode string // select, select_async, bottom_sheet Select2ResultTemplate template.JS Select2SelectionTemplate template.JS + ForSerializedObject bool RemoteDataResource *Resource RemoteDataHasImage bool PrimaryField string diff --git a/meta_select_one.go b/meta_select_one.go index d40095e6..4b86e7ab 100644 --- a/meta_select_one.go +++ b/meta_select_one.go @@ -25,6 +25,7 @@ type SelectOneConfig struct { Select2SelectionTemplate template.JS RemoteDataResource *Resource RemoteDataHasImage bool + ForSerializedObject bool PrimaryField string metaConfig getCollection func(interface{}, *Context) [][]string