InputSelect2Options.cs 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. using Newtonsoft.Json;
  2. namespace KeudellCoding.Blazor.AdvancedBlazorSelect2
  3. {
  4. public class InputSelect2Options
  5. {
  6. [JsonProperty("adaptContainerCssClass")]
  7. public object AdaptContainerCssClass { get; set; } = null;
  8. [JsonProperty("adaptDropdownCssClass")]
  9. public object AdaptDropdownCssClass { get; set; } = null;
  10. [JsonProperty("ajax")]
  11. public object Ajax { get; set; } = null;
  12. [JsonProperty("allowClear")]
  13. public bool AllowClear { get; set; } = true;
  14. [JsonProperty("amdBase")]
  15. public string AmdBase { get; set; } = "./";
  16. [JsonProperty("amdLanguageBase")]
  17. public string AmdLanguageBase { get; set; } = "./i18n/";
  18. [JsonProperty("closeOnSelect")]
  19. public bool CloseOnSelect { get; set; } = true;
  20. [JsonProperty("containerCss")]
  21. public object ContainerCss { get; set; } = null;
  22. [JsonProperty("containerCssClass")]
  23. public string ContainerCssClass { get; set; } = string.Empty;
  24. //[JsonProperty("data")]
  25. //public IList<Select2Item> DefaultData { get; set; }
  26. [JsonProperty("debug")]
  27. public bool Debug { get; set; } = false;
  28. [JsonProperty("disabled")]
  29. public bool Disabled { get; set; } = false;
  30. [JsonProperty("dropdownAutoWidth")]
  31. public bool DropdownAutoWidth { get; set; } = false;
  32. [JsonProperty("dropdownCss")]
  33. public object DropdownCss { get; set; } = null;
  34. [JsonProperty("dropdownCssClass")]
  35. public string DropdownCssClass { get; set; } = string.Empty;
  36. [JsonProperty("maximumInputLength")]
  37. public int MaximumInputLength { get; set; } = 0;
  38. [JsonProperty("maximumSelectionLength")]
  39. public int MaximumSelectionLength { get; set; } = 0;
  40. [JsonProperty("minimumInputLength")]
  41. public int MinimumInputLength { get; set; } = 0;
  42. [JsonProperty("minimumResultsForSearch")]
  43. public int MinimumResultsForSearch { get; set; } = 0;
  44. [JsonProperty("multiple")]
  45. public bool Multiple { get; set; } = false;
  46. [JsonProperty("placeholder")]
  47. public string Placeholder { get; set; } = string.Empty;
  48. [JsonProperty("selectOnClose")]
  49. public bool SelectOnClose { get; set; } = false;
  50. //[JsonProperty("tags")]
  51. //public bool Tags { get; set; } = false;
  52. [JsonProperty("theme")]
  53. public string Theme { get; set; } = "default";
  54. [JsonProperty("tokenSeparators")]
  55. public HashSet<char> TokenSeparators { get; set; } = new HashSet<char> { };
  56. [JsonProperty("width")]
  57. public string Width { get; set; } = "100%";
  58. [JsonProperty("scrollAfterSelect")]
  59. public bool ScrollAfterSelect { get; set; } = false;
  60. [JsonProperty("noMarkupEscape")]
  61. public bool NoMarkupEscape { get; set; } = true;
  62. }
  63. }