mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(grid-layout): value parser will now accept strings or numbers (#8042)
This commit is contained in:
committed by
Alexander Vakrilov
parent
2aa6e9bf92
commit
3199a392b4
@@ -58,7 +58,8 @@ function convertGridLength(value: string): ItemSpec {
|
||||
}
|
||||
|
||||
function parseAndAddItemSpecs(value: string, func: (itemSpec: ItemSpec) => void): void {
|
||||
const arr = value.split(/[\s,]+/);
|
||||
// ensure value is a string since view bindings could be parsed as number/int's here
|
||||
const arr = `${value}`.split(/[\s,]+/);
|
||||
for (let i = 0, length = arr.length; i < length; i++) {
|
||||
const str = arr[i].trim();
|
||||
if (str.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user