atomicojs / hooks

utility kit for use with Atomico

Home Page:https://atomico.gitbook.io/doc/atomico/atomico-hooks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

file input element inside a-router not working

ranglang opened this issue · comments

const result1 = demoResult((props) => <div><input type="file" name='ddd'/>InSide</div>);

const result2 = demoResult((props) => <h3>Config</h3>);

const result3 = demoResult((props) => <h3>{JSON.stringify(props)}</h3>);

export default [
  {
    label: "Ejemplo",
    render() {
      return (
        <host>
          <a-router-proxy>
            <p>
              The import effect is emulated with a delay to show the use of the
              loading slot
            </p>
            <nav>
              <a style="margin:5px" href="/">
                home
              </a>
              <a style="margin:5px" href="/user">
                user
              </a>
              <a style="margin:5px" href="/config">
                config
              </a>
            </nav>
            <a-router-switch>
              <a-router-case path="/" src={result1}></a-router-case>
              <a-router-case path="/user" src={result2}></a-router-case>
              <a-router-case path="/:any..." src={result3}></a-router-case>
              <h1 slot="loading">loading...</h1>
              <h1 slot="404">404</h1>
            </a-router-switch>
          </a-router-proxy>
          <div><input type="file" name='outsize'/>Outsize</div>
        </host>
      );
    },
  },
];

ranglang@02cc9c0

7rhar-416wh

Hi, I apologize for not responding earlier. thanks for detecting this behavior, I will look for a solution to this bug within the day, Thank you very much for using Atomico!.

Problem solved in version 0.3.2, it is not a bug of the Atomico core, it was a mishandling of the onclick event associated with the component a-router-proxy.

a-router-proxy captures click events to redirect the target path, if it declares the href attribute

Thanks for your issue

thanks you