@galadrim/galadmin 0.1.129 → 0.1.130

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -137,6 +137,14 @@ export default ({ column, onChange, initialData }) => {
137
137
  initialData={initialData}
138
138
  />
139
139
  );
140
+ } else if (dataType === "string[]") {
141
+ return (
142
+ <input
143
+ type='text'
144
+ onChange={(e) => onChange({ [column.name]: e.target.value.split(",").map(x => x.trim()) })}
145
+ defaultValue={initialData?.[column.name]?.join(", ")}
146
+ />
147
+ );
140
148
  } else {
141
149
  return (
142
150
  <input
@@ -45,6 +45,8 @@ export default (column, record, config, onTable) => {
45
45
  return <div dangerouslySetInnerHTML={{ __html: record[column.htmlField] }} />
46
46
  } else if (column.dataType === "select" && column.options && column.options.constructor == Object) {
47
47
  return <div>{column.options[record[column.name]]}</div>
48
+ } else if (column.dataType === "string[]") {
49
+ return <div>{record[column.name].join(", ")}</div>
48
50
  } else {
49
51
  return <div>{record[column.name]}</div>
50
52
  }