endimonan commented on code in PR #38470:
URL: https://github.com/apache/superset/pull/38470#discussion_r2912151344
##########
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx:
##########
@@ -1698,6 +1718,57 @@ const FiltersConfigForm = (
)}
</CollapsibleControl>
</FormItem>
+ {!isChartCustomization && (
+ <StyledRowFormItem
+ expanded={expanded}
+ name={[
+ 'filters',
+ filterId,
+ 'controlValues',
+ 'operatorType',
+ ]}
+ initialValue={currentOperatorType}
+ label={
+ <>
+ <StyledLabel>{t('Match type')}</StyledLabel>
+
+ <InfoTooltip
+ placement="top"
+ tooltip={t(
+ 'Warning: ILIKE queries may be slow on
large datasets as they cannot use indexes effectively.',
+ )}
+ />
+ </>
+ }
+ >
+ <Select
+ ariaLabel={t('Match type')}
+ options={[
+ {
+ value: SelectFilterOperatorType.Exact,
+ label: t('Exact match (IN)'),
+ },
+ {
+ value: SelectFilterOperatorType.Contains,
+ label: t('Contains text (ILIKE %x%)'),
+ },
+ {
+ value: SelectFilterOperatorType.StartsWith,
+ label: t('Starts with (ILIKE x%)'),
+ },
+ {
+ value: SelectFilterOperatorType.EndsWith,
+ label: t('Ends with (ILIKE %x)'),
+ },
+ ]}
+ onChange={value => {
+ onOperatorTypeChanged(
+ value as SelectFilterOperatorType,
+ );
+ }}
+ />
+ </StyledRowFormItem>
+ )}
Review Comment:
Makes sense, the Match type dropdown is only relevant to the Select filter
since the other native filter types (range, time, timegrain) don't use text
matching operators
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]