@onehat/ui 0.2.7 → 0.2.9
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
|
@@ -226,6 +226,7 @@ export function DateElement(props) {
|
|
|
226
226
|
pickerValue = pickerValue.toDate();
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
+
const DT = Datetime.default || Datetime; // this shouldn't be necessary, but I couldn't get it to work unless doing this! Something is screwey with the ES6 import of Datetime.
|
|
229
230
|
|
|
230
231
|
// Web version
|
|
231
232
|
return <Tooltip label={tooltip} placement={tooltipPlacement}>
|
|
@@ -321,7 +322,7 @@ export function DateElement(props) {
|
|
|
321
322
|
ref={pickerRef}
|
|
322
323
|
p={0}
|
|
323
324
|
>
|
|
324
|
-
<
|
|
325
|
+
<DT
|
|
325
326
|
open={true}
|
|
326
327
|
input={false}
|
|
327
328
|
closeOnClickOutside={false}
|
|
@@ -192,12 +192,7 @@ function Form(props) {
|
|
|
192
192
|
// Getting an error that the OrdersEditor is missing users__email.
|
|
193
193
|
// Why is this even on the OrdersEditor? Runner?
|
|
194
194
|
}
|
|
195
|
-
let element
|
|
196
|
-
if (isValidElement(Element)) {
|
|
197
|
-
element = Element;
|
|
198
|
-
debugger;
|
|
199
|
-
} else {
|
|
200
|
-
element = <Element
|
|
195
|
+
let element = <Element
|
|
201
196
|
name={name}
|
|
202
197
|
value={value}
|
|
203
198
|
setValue={(newValue) => {
|
|
@@ -211,7 +206,6 @@ function Form(props) {
|
|
|
211
206
|
// {...defaults}
|
|
212
207
|
// {...propsToPass}
|
|
213
208
|
/>;
|
|
214
|
-
}
|
|
215
209
|
|
|
216
210
|
// element = <Tooltip key={ix} label={header} placement="bottom">
|
|
217
211
|
// {element}
|
|
@@ -346,6 +340,9 @@ function Form(props) {
|
|
|
346
340
|
isDirty,
|
|
347
341
|
error,
|
|
348
342
|
} = fieldState;
|
|
343
|
+
if (isValidElement(Element)) {
|
|
344
|
+
throw new Error('Should not yet be valid React element. Did you use <Element> instead of () => <Element> when defining it?')
|
|
345
|
+
}
|
|
349
346
|
let element = <Element
|
|
350
347
|
name={name}
|
|
351
348
|
value={value}
|