nitro-web 0.0.81 → 0.0.83
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.
|
@@ -158,7 +158,7 @@ export const Filters = forwardRef<FiltersHandleType, FiltersProps>(({
|
|
|
158
158
|
<Elements.Field
|
|
159
159
|
{...filter}
|
|
160
160
|
class="!mb-0"
|
|
161
|
-
value={state[filter.name] as string || ''}
|
|
161
|
+
value={(state[filter.name] as string) || ''}
|
|
162
162
|
onChange={onInputChange}
|
|
163
163
|
/>
|
|
164
164
|
}
|
|
@@ -37,7 +37,7 @@ export function Drop({ awsUrl, className, id, name, onChange, multiple, state, .
|
|
|
37
37
|
stateRef.current = state
|
|
38
38
|
|
|
39
39
|
// Input is always controlled if state is passed in
|
|
40
|
-
if (props.value) value = props.value as Image
|
|
40
|
+
if (typeof props.value !== 'undefined') value = props.value as Image
|
|
41
41
|
else if (typeof state == 'object') value = deepFind(state, name) as Image
|
|
42
42
|
if (typeof value == 'undefined') value = null
|
|
43
43
|
|
|
@@ -68,7 +68,7 @@ function FieldBase({ state, icon, iconPos: ip, ...props }: FieldProps) {
|
|
|
68
68
|
})
|
|
69
69
|
|
|
70
70
|
// Value: Input is always controlled if state is passed in
|
|
71
|
-
if (props.value) value = props.value as string
|
|
71
|
+
if (typeof props.value !== 'undefined') value = props.value as string
|
|
72
72
|
else if (typeof state == 'object') {
|
|
73
73
|
const v = deepFind(state, props.name) as string | undefined
|
|
74
74
|
value = v ?? ''
|
|
@@ -57,7 +57,7 @@ function SelectBase({ id, containerId, minMenuWidth, name, prefix='', onChange,
|
|
|
57
57
|
if (!name) throw new Error('Select component requires a `name` and `options` prop')
|
|
58
58
|
|
|
59
59
|
// Get value from value or state
|
|
60
|
-
if (
|
|
60
|
+
if (typeof props.value !== 'undefined') value = props.value
|
|
61
61
|
else if (typeof state == 'object') value = deepFind(state, name)
|
|
62
62
|
|
|
63
63
|
// If multi-select, filter options by value
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nitro-web",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.83",
|
|
4
4
|
"repository": "github:boycce/nitro-web",
|
|
5
5
|
"homepage": "https://boycce.github.io/nitro-web/",
|
|
6
6
|
"description": "Nitro is a battle-tested, modular base project to turbocharge your projects, styled using Tailwind 🚀",
|
|
@@ -48,7 +48,8 @@
|
|
|
48
48
|
"passport-jwt": "^4.0.1",
|
|
49
49
|
"passport-local": "^1.0.0",
|
|
50
50
|
"sort-route-addresses-nodeps": "0.0.4",
|
|
51
|
-
"standard-version": "github:boycce/standard-version"
|
|
51
|
+
"standard-version": "github:boycce/standard-version",
|
|
52
|
+
"tailwind-merge": "^2.6.0"
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
54
55
|
"@types/dateformat": "^5.0.3"
|