@kaspernj/api-maker 1.0.411 → 1.0.412

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaspernj/api-maker",
3
- "version": "1.0.411",
3
+ "version": "1.0.412",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "main": "index.js",
@@ -216,14 +216,19 @@ const ApiMakerInputsInput = memo(shapeComponent(class ApiMakerInputsInput extend
216
216
 
217
217
  onInputChanged = (e) => {
218
218
  const {form} = this.tt
219
- const {attribute, autoSubmit, inputProps, model, name, onChange} = this.props
219
+ const {attribute, autoSubmit, inputProps, model, onChange} = this.props
220
220
  const {localizedNumber} = digs(this.props, "localizedNumber")
221
+ const {name} = inputProps
221
222
 
222
223
  if (localizedNumber) this.inputReference().current.value = this.actualValue(digg(e, "target"))
223
224
 
224
225
  if (attribute && autoSubmit && model) this.delayAutoSubmit()
225
226
  if (digg(inputProps, "type") == "file") this.setState({blankInputName: this.getBlankInputName()})
226
- if (form && name) form.setValue(name, e.target.value)
227
+
228
+ if (form && name) {
229
+ form.setValue(name, e.target.value)
230
+ }
231
+
227
232
  if (onChange) onChange(e)
228
233
  }
229
234
 
@@ -96,7 +96,7 @@ export default memo(shapeComponent(class ApiMakerBootStrapLiveTableModelRow exte
96
96
  }
97
97
 
98
98
  columnsContentFromColumns(model, even) {
99
- const {isSmallScreen, preparedColumns} = this.p
99
+ const {isSmallScreen, liveTable, preparedColumns} = this.p
100
100
 
101
101
  return preparedColumns?.map(({column, tableSettingColumn, width}, columnIndex) => columnVisible(column, tableSettingColumn) &&
102
102
  <Column
@@ -105,13 +105,13 @@ export default memo(shapeComponent(class ApiMakerBootStrapLiveTableModelRow exte
105
105
  identifier: columnIdentifier(column)
106
106
  }}
107
107
  key={columnIdentifier(column)}
108
- style={this.p.liveTable.styleForColumn({column, columnIndex, even, style: {width: `${width}%`}})}
109
- {...this.props.liveTable.columnProps(column)}
108
+ style={liveTable.styleForColumn({column, columnIndex, even, style: {width: `${width}%`}})}
109
+ {...liveTable.columnProps(column)}
110
110
  >
111
111
  {isSmallScreen &&
112
112
  <View dataSet={{class: "table--column-label"}}>
113
113
  <Text>
114
- {this.props.liveTable.headerLabelForColumn(column)}
114
+ {liveTable.headerLabelForColumn(column)}
115
115
  </Text>
116
116
  </View>
117
117
  }
@@ -152,7 +152,7 @@ export default memo(shapeComponent(class ApiMakerBootStrapLiveTableModelRow exte
152
152
  const attribute = currentModel.constructor.attributes().find((attribute) => attribute.name() == attributeNameUnderscore)
153
153
  const modelColumn = attribute?.getColumn()
154
154
 
155
- if (modelColumn?.getType() == "date") {
155
+ if (modelColumn?.getType() == "date" && value) {
156
156
  return (
157
157
  <Text>{this.presentDateTime({apiMakerType: "date", value})}</Text>
158
158
  )