-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: add enable and list filters for Scheds
- Loading branch information
1 parent
0cbbb42
commit 908e21f
Showing
12 changed files
with
220 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
querybook/webapp/components/DataDocScheduleList/DataDocBoardsSelect.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React, { useMemo } from 'react'; | ||
import { IStoreState } from 'redux/store/types'; | ||
import { useSelector } from 'react-redux'; | ||
import { SimpleField } from 'ui/FormikField/SimpleField'; | ||
|
||
export const DataDocBoardsSelect = ({ onChange, value }) => { | ||
const activeBoardId = useSelector( | ||
(state: IStoreState) => state.board.boardById | ||
); | ||
|
||
const boards = useMemo(() => { | ||
return Object.values(activeBoardId).map((board) => ({ | ||
value: board.id, | ||
label: board.name, | ||
})); | ||
}, [activeBoardId]); | ||
|
||
return ( | ||
<SimpleField | ||
label="Lists" | ||
name="board_ids" | ||
value={value} | ||
defaultValue={boards.filter((board) => | ||
value.includes(board.value) | ||
)} | ||
options={boards} | ||
onChange={onChange} | ||
optionSelector={(v) => v} | ||
closeMenuOnSelect={false} | ||
hideSelectedOptions={false} | ||
isMulti | ||
type="react-select" | ||
/> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export interface OptionsType { | ||
value: string; | ||
key: string; | ||
hidden?: boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -213,3 +213,4 @@ export const queryCellSelector = createSelector(dataDocCellsSelector, (cells) => | |
}; | ||
}) | ||
); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.