geido commented on a change in pull request #14665:
URL: https://github.com/apache/superset/pull/14665#discussion_r633619273
##########
File path: superset-frontend/src/explore/components/ControlRow.tsx
##########
@@ -16,17 +16,19 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { ExpandedControlItem } from '@superset-ui/chart-controls';
import React from 'react';
const NUM_COLUMNS = 12;
-export default function ControlRow({
- controls,
-}: {
- controls: ExpandedControlItem[];
-}) {
- const colSize = NUM_COLUMNS / controls.length;
+type Control = React.ReactElement | null;
+
+export default function ControlRow({ controls }: { controls: Control[] }) {
+ // ColorMapControl renders null and should not be counted
+ // in the columns number
+ const countableControls = controls.filter(
+ control => !['ColorMapControl'].includes(control?.props.type),
Review comment:
Specific check required as this needs to be rendered but the component
itself is null (within)/invisible to the end-user.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]