Skip to content

Commit

Permalink
Port changes from main
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonkopliku committed Nov 8, 2024
1 parent 23c7c04 commit 18b49ea
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
3 changes: 0 additions & 3 deletions assets/js/common/ComposedFilter/ComposedFilter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,13 @@ const renderFilter = (key, { type, ...filterProps }, value, onChange) => {
* @param {Object} props.value - Key/value pairs of selected filters, where key is the filter key
* @param {Function} props.onChange - Function to call when the composed value changes. If autoApply is true, this function is called on every filter change
* @param {Boolean} props.autoApply - If true, onChange is called on every filter change; otherwise, an apply button is shown
* @param {Number} props.rows - Number of rows to display the filters
* @param {ReactNode} props.children - Additional elements to display after the filters
*/
function ComposedFilter({
filters = [],
onChange,
value: initialValue = {},
autoApply,
// rows = 1,
children,
}) {
const [value, setValue] = useState(initialValue);
Expand All @@ -73,7 +71,6 @@ function ComposedFilter({

return (
<div className="grid grid-flow-col gap-4">
{/* <div className={`grid grid-rows-${rows} grid-flow-col gap-4`}> */}
{filters
.map(({ key, ...rest }) => [key, rest, value[key], onFilterChange(key)])
.map((args) => renderFilter(...args))}
Expand Down
1 change: 0 additions & 1 deletion assets/js/pages/ActivityLogPage/ActivityLogPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ function ActivityLogPage() {
<div className="bg-white rounded-lg shadow">
<div className="p-4">
<ComposedFilter
rows={2}
filters={filters}
autoApply={false}
value={searchParamsToFilterValue(searchParams)}
Expand Down

0 comments on commit 18b49ea

Please sign in to comment.