Describe the bug
The layer data source picker is always disabled
Expected behavior
The data source picker should be visible and enabled when there are multiple datasets
Additional context
It seems that the data source picker is always disabled because of this check layer.type && config.columns. Since most layers have required columns, it's not possible to change the data source for a layer, even if the default chosen is not at all suitable for that layer's data.
Additionally, i'm getting the warning Warning: Failed prop type: Invalid prop 'disabled' of type 'object' supplied to 'ItemSelector', expected 'boolean'.
Perhaps this is why it's evaling to true?
Noticed this too a while back, it's not always disabled though; If you have multiple datasets loaded and create a new layer, you can't select the dataset once you have selected a layer type. Though, if you press the 3 dots to expand the layer menu (before selecting a layer type), you will be able to select any loaded dataset.
I do totally agree that this feels like a bug, and it should be possible to change the dataset of an already set layer.
@bskrt Oh! Hot dang! You just saved me half a day of trying to figure out a work around hahaha
Though changing the dataset after layer type selection would work better with the flow. You don't see the field until you've selected a layer type and are mapping data fields. I worry that like myself, users will encounter this and assume the feature is broken.
Ha! Glad I could help :)
Yup, totally agree. Actually it would make more sense if you first have to select a dataset and then a layer type, or at least just have the first step expanded in the first place.
The problem is if you change the dataset of an already set layer, the base column of that layer will not be valid anymore, unless kepler tries to find column with the same name in the new dataset. This goes on to all the color / radius / height based on columns. As a lazy solution, we simply disabled select dataset in a layer once it's set.
If you think this is a must have feature, please create a feature request for "Allow Replacing source dataset in layers"
Not necessarily a must have feature, but I would expand the UI group by
default, so the dataset dropdown is visible.
Right now it's very easy to miss.
To go a step further I would put the dataset field above the layer type.
From a UX perspective it would be way clearer.
On Tue, 23 Jul 2019, 21:50 Shan He, notifications@github.com wrote:
The problem is if you change the dataset of an already set layer, the base
column of that layer will not be valid anymore, unless kepler tries to find
column with the same name in the new dataset. This goes on to all the color
/ radius / height based on columns. As a lazy solution, we simply disabled
select dataset in a layer once it's set.If you think this is a must have feature, please create a feature request
for "Allow Replacing source dataset in layers"—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/keplergl/kepler.gl/issues/617?email_source=notifications&email_token=AAFWODSP67DVOBNPOJFTJN3QA5OJTA5CNFSM4IE6VNV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2UHWOA#issuecomment-514358072,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAFWODSF2E4BSBX2QC7XKQDQA5OJTANCNFSM4IE6VNVQ
.
Created a FR here
https://github.com/keplergl/kepler.gl/issues/650
Most helpful comment
Noticed this too a while back, it's not always disabled though; If you have multiple datasets loaded and create a new layer, you can't select the dataset once you have selected a layer type. Though, if you press the 3 dots to expand the layer menu (before selecting a layer type), you will be able to select any loaded dataset.
I do totally agree that this feels like a bug, and it should be possible to change the dataset of an already set layer.