Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdown: filter options doesn't get value when using the component in a modal #6293

Closed
mahyaasadi opened this issue Apr 3, 2024 · 1 comment
Assignees
Labels
Status: Needs Reproducer Issue needs a runnable reproducer

Comments

@mahyaasadi
Copy link

mahyaasadi commented Apr 3, 2024

Describe the bug

in a Next JS project, when I use the Dropdown component on a page, the filter feature gets the value and filters the options correctly but when using it in a modal, when I try to type in a value in the filter input the value property won't change.

the modal that I am using is react-bootstrap.
I checked the style of filter input on both occasions and they have no difference, changing the z-index of the modal didn't solve the issue either.

here is my full modal:


import { Modal } from "react-bootstrap";
import { Dropdown } from "primereact/dropdown";

const WarehouseReceptionModal = ({
  show,
  onHide,
  ....
}) => {
  return (
    <>
      <Modal show={show} onHide={onHide} centered size="lg">
        <Modal.Header>
          <Modal.Title> title </Modal.Title>
        </Modal.Header>

        <Modal.Body>
          <form
            onSubmit={submitWarehouseItem}
          >
                  <label className="lblAbs font-12">انتخاب کالا</label>
                  <Dropdown
                    value={selectedWItem}
                    onChange={(e) => FUSelectWItem(e.target.value)}
                    options={warehouseItemsData}
                    optionLabel="Name"
                    placeholder="انتخاب کنید"
                    filter
                    showClear
                  />

            <div className="submit-section">
              <button
                type="submit"
                className="btn btn-primary rounded btn-save font-13"
              >
              submit
              </button>
            </div>
          </form>
        </Modal.Body>
      </Modal>
    </>
  );
};

export default WarehouseReceptionModal;

PrimeReact version

10.0.7

React version

18.x

Language

ES6

Build / Runtime

Next.js

@mahyaasadi mahyaasadi added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 3, 2024
@melloware melloware added Status: Needs Reproducer Issue needs a runnable reproducer and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jan 3, 2025
Copy link

github-actions bot commented Jan 3, 2025

Please fork the Stackblitz project and create a case demonstrating your bug report. This issue will be closed if no activities in 20 days.

@nitrogenous nitrogenous removed their assignment Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Reproducer Issue needs a runnable reproducer
Projects
None yet
Development

No branches or pull requests

4 participants