Closed sachya closed 7 years ago
@sachya we have no issues at all with that. what is the getVehicleforTrip function contents?
Hi tony,
the big problem is with function array_merge, it starts key value with 1. So
array(2) { [1]=> string(10) "mh18aj6209" [2]=> string(4) "MH45" }
becomes
array(2) { [0]=> string(10) "mh18aj6209" [1]=> string(4) "MH45" }
if we use alphabet or non-numericals it works just fine, but fumble over numeric keys.
The solution i got:
'items' => [''=>'']+app\models\Vehicle::getvehiclefortrip()
Keep this area tagged as i got the array merge solution from one of your sorted issues. Meanwhile, enjoying selectize, Thank You
We cannot fight against PHP's defaults behavior. Thanks for the hint.
Consider array
array(2) { [1]=> string(10) "mh18aj6209" [2]=> string(4) "MH45" }
Selectize actually presents this as followsarray(2) { [0]=> string(10) "mh18aj6209" [1]=> string(4) "MH45" }
It is a big problem for me, as i primarily work keys as db primary key records. Please help to rectify this error. The code i used:
I tried using regular selectize js on codepen and it works there. Strange issue.