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

Reset form-like components when the parent <form> resets #2004

Merged
merged 11 commits into from Nov 9, 2022

Commits on Nov 4, 2022

  1. Copy the full SHA
    f3b6586 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2022

  1. refactor React Listbox

    This splitsup the raw `[state, dispatch]` to separate `useActions` and `useData` hooks.
    
    This allows us to make the actions themselves simpler and include logic
    that doesn't really belong in the reducer itself.
    
    This also allows us to expose data via the `useData` hook that doesn't
    belong in the state exposed from the `useReducer` hook.
    
    E.g.: we used to store a `propsRef` from the root `Listbox`, and update
    the ref with the new props in a `useEffect`. Now, we will just expose
    that information directly via the `useData` hook. This simplifies the
    code, removes useEffect's and so on.
    RobinMalfait committed Nov 8, 2022
    Copy the full SHA
    4eafa39 View commit details
    Browse the repository at this point in the history
  2. refactor Tabs, ensure function reference stays the same

    If the `isControlled` value changes, then the references to all the
    functions changed. Now they won't because of the `useEvent` hooks.
    RobinMalfait committed Nov 8, 2022
    Copy the full SHA
    7039d48 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    4ed1dac View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    09c7f02 View commit details
    Browse the repository at this point in the history

Commits on Nov 9, 2022

  1. Copy the full SHA
    4dc63fe View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    5be25d5 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    5854dcf View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    cc5ee54 View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    7b31cf6 View commit details
    Browse the repository at this point in the history
  6. update changelog

    RobinMalfait committed Nov 9, 2022
    Copy the full SHA
    2005f1a View commit details
    Browse the repository at this point in the history