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

Open
mahyaasadi opened this issue Apr 3, 2024 · 0 comments
Assignees
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

3 participants