mirror of
https://github.com/apache/superset.git
synced 2026-04-11 04:15:33 +00:00
fix: show label for filters in filter box in explore (#10412)
* fix: show label for filters in filter box in explore * test: add test for label in filter box * test: add test / fix lint * fix: fix CR notes * refactor: add label propType to FilterBoxItemControl.jsx
This commit is contained in:
@@ -27,6 +27,7 @@ import FormRow from 'src/components/FormRow';
|
||||
import datasources from '../../../fixtures/mockDatasource';
|
||||
|
||||
const defaultProps = {
|
||||
label: 'some label',
|
||||
datasource: datasources['7__table'],
|
||||
onChange: sinon.spy(),
|
||||
};
|
||||
@@ -51,6 +52,9 @@ describe('FilterBoxItemControl', () => {
|
||||
it('renderForms does the job', () => {
|
||||
const popover = shallow(inst.renderForm());
|
||||
expect(popover.find(FormRow)).toHaveLength(8);
|
||||
expect(popover.find(FormRow).get(1).props.control.props.value).toEqual(
|
||||
'some label',
|
||||
);
|
||||
});
|
||||
|
||||
it('convert type for single value filter_box', () => {
|
||||
|
||||
Reference in New Issue
Block a user