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:
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.
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