Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

Commit

Permalink
fix(chart-controls): temporal col placeholder for hybrid dnd
Browse files Browse the repository at this point in the history
  • Loading branch information
kgabryje committed Aug 18, 2021
1 parent ff2309a commit 8f7178a
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t, validateNonEmpty } from '@superset-ui/core';
import { FeatureFlag, isFeatureEnabled, t, validateNonEmpty } from '@superset-ui/core';
import { ExtraControlProps, SharedControlConfig } from '../types';
import { TIME_COLUMN_OPTION, TIME_FILTER_LABELS } from '../constants';

Expand Down Expand Up @@ -156,7 +156,11 @@ export const dnd_granularity_sqla: typeof dndGroupByControl = {
'expression',
),
canDelete: false,
ghostButtonText: t('Drop temporal column here'),
ghostButtonText: t(
isFeatureEnabled(FeatureFlag.ENABLE_DND_WITH_CLICK_UX)
? 'Drop a temporal column here or click'
: 'Drop temporal column here',
),
mapStateToProps: ({ datasource }) => {
const temporalColumns = datasource?.columns.filter(c => c.is_dttm) ?? [];
const options = Object.fromEntries(temporalColumns.map(option => [option.column_name, option]));
Expand Down

0 comments on commit 8f7178a

Please sign in to comment.