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

radio not clicking on modal #19

Open
allphonesblog opened this issue Oct 10, 2020 · 0 comments
Open

radio not clicking on modal #19

allphonesblog opened this issue Oct 10, 2020 · 0 comments

Comments

@allphonesblog
Copy link

allphonesblog commented Oct 10, 2020

i have two modal and radio input in it, when i open the modal its not checked , i dont know why

const From = () => {
        const [index, setIndex] = React.useState(0)
        return (
            <HyperModal
            isFullscreen

            renderOpenButton={requestOpen => (

            <h2 className="fmt" data-target="modal-ter" style={{"cursor":"pointer"}} onClick={requestOpen}>LOS</h2>
        )}
    >
        {(props: ModalStackProps) => (
         <ModalStack {...props}> // !!! It's very important to provide props to ModalStack
        <div style={{ color: 'red' }}>
            <div>1</div>
<button onClick={() => setIndex(1)}>open nested</button>
<button onClick={() => props.handleClose()}>close</button>
</div>


</ModalStack>

)}

    <div className="tabsx">

        <div className="tabx">
            <input type="radio" id="tab1" name="tab-group" defaultChecked />
                <label htmlFor="tab1">SEARCH</label>
<div className="tab-contentx">

    <div className="field">

        <div className="control" id="searchdiv">
            <p style={{marginTop: '-70px', position: 'absolute'}} className="title">move From</p>

            <input className="input is-large" type="text" placeholder="going FROM" style={{border: '3px solid black', fontWeight: 'bold'}} />

                </div>
</div>

</div>
</div>
<div className="tabx">
    <input type="radio" id="tab2" name="tab-group" />
        <label htmlFor="tab2">RECENT</label>
<div className="tab-contentx">
  <div className="card">
      <div className="card-content">
          <p className="subtitle">
            Go to test
                  </p>

          </div>

      </div>

</div>
</div>


</div>



    </HyperModal>
)
}


const To = () => {
    const [index, setIndex] = React.useState(0)
    return (
        <HyperModal
        isFullscreen

        renderOpenButton={requestOpenTo => (

        <h2 className="fmt" data-target="modal-ter" style={{"cursor":"pointer"}} onClick={requestOpenTo}>TO</h2>
    )}
>
    {(props: ModalStackProps) => (
     <ModalStack {...props}> // !!! It's very important to provide props to ModalStack
    <div style={{ color: 'red' }}>
        <div>1</div>
<button onClick={() => setIndex(1)}>open nested</button>
<button onClick={() => props.handleClose()}>close</button>
</div>


</ModalStack>

)}

    <div className="tabsx">

        <div className="tabx">
            <input type="radio" id="tabTO" name="tab-group" defaultChecked />
                <label htmlFor="tabTO">SEARCH</label>
<div className="tab-contentx">

    <div className="field">

        <div className="control" id="searchdiv">
            <p style={{marginTop: '-70px', position: 'absolute'}} className="title">Take To</p>

<input className="input is-large" type="text" placeholder="go TO" style={{border: '3px solid black', fontWeight: 'bold'}} />

</div>
</div>

</div>
</div>
<div className="tabx">
    <input type="radio" id="tab2To" name="tab-group" />
        <label htmlFor="tab2To">RECENT</label>
<div className="tab-contentx">
    <div className="card">
        <div className="card-content">
            <p className="subtitle">
               test
                    </p>

</div>

</div>

</div>
</div>


</div>



</HyperModal>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant