@bitrise/bitkit 13.248.0 → 13.249.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit",
3
3
  "description": "Bitrise React component library",
4
- "version": "13.248.0",
4
+ "version": "13.249.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+ssh://git@github.com/bitrise-io/bitkit.git"
@@ -128,7 +128,7 @@ const FilterForm = (props: FilterFormProps) => {
128
128
  const isAsync = !!onAsyncSearch;
129
129
  const withSearch = (options && options.length > 5) || isAsync;
130
130
 
131
- const isDisabled = isEqual(selected, value) || !selected[0].includes('*');
131
+ const isSubmitDisabled = isEqual(selected, value) || (mode === 'pattern' && !selected[0].includes('*'));
132
132
  const filteredOptions = useMemo(() => {
133
133
  if (options?.length) {
134
134
  return options.filter((opt) => {
@@ -314,8 +314,11 @@ const FilterForm = (props: FilterFormProps) => {
314
314
  <Button onClick={onCancelClick} size="sm" type="reset" variant="secondary">
315
315
  Cancel
316
316
  </Button>
317
- <Tooltip label={isDisabled ? 'Add `*` in the pattern or select manually.' : undefined}>
318
- <Button isDisabled={isDisabled} size="sm" type="submit">
317
+ <Tooltip
318
+ label="Add `*` in the pattern or select manually."
319
+ isDisabled={mode === 'manually' || !!(selected[0] && selected[0].includes('*'))}
320
+ >
321
+ <Button isDisabled={isSubmitDisabled} size="sm" type="submit">
319
322
  {(selected.length === 0 || selected[0] === '') && isEditMode ? 'Remove' : 'Apply'}
320
323
  </Button>
321
324
  </Tooltip>