This issue is not a show stopper, but something I noticed and was wondering if it is intended behavior. Given this example (code can be pasted inside an example window of the feature explorer):
This leads to this result:
![not working.png Click image for larger version
Name: not working.png
Views: 66
Size: 6.7 KB
ID: 271260](filedata/fetch?id=271260&d=1699016224)
I would have expected the Length and Width values to be aligned right (because of the type "float" in the data source for these fields). I set the "format" property in the data source on purpose to demonstrate its settings gets applied in the pick list. As the code suggests, explicitly setting the "type" property in the pick list fields makes the alignment work. If I don't do this and inspect the SelectItem in the browser's console, the type is implicitly set to float. I hope the following image explains what I mean.
![implicit.png Click image for larger version
Name: implicit.png
Views: 41
Size: 94.9 KB
ID: 271261](filedata/fetch?id=271261&d=1699017180)
Code:
isc.DynamicForm.create({ fields: [{ displayField: 'name', name: 'example', optionDataSource: isc.DataSource.create({ cacheData: [ { code: 'y', length: 1.5, name: 'Y', width: 1.5 }, { code: 'z', length: 1.0, name: 'Z', width: 1.0 } ], clientOnly: true, fields: [ { name: 'code', primaryKey: true, type: 'text' }, { format: ',0.00', name: 'length', type: 'float' }, { name: 'name', type: 'text' }, { format: ',0.00', name: 'width', type: 'float' } ] }), pickListFields: [ { name: 'name' }, { name: 'length' }, // use { name: 'length', type: 'float' } to make the alignment work { name: 'width' } // use { name: 'width', type: 'float' } to make the alignment work ], pickListWidth: 300, title: 'Example', type: 'select', valueField: 'code' }] });
I would have expected the Length and Width values to be aligned right (because of the type "float" in the data source for these fields). I set the "format" property in the data source on purpose to demonstrate its settings gets applied in the pick list. As the code suggests, explicitly setting the "type" property in the pick list fields makes the alignment work. If I don't do this and inspect the SelectItem in the browser's console, the type is implicitly set to float. I hope the following image explains what I mean.
Comment