Skip to content

Conversation

@dleroux
Copy link
Contributor

@dleroux dleroux commented Aug 14, 2019

WHY are these changes introduced?

Fixes #668

WHAT is this pull request doing?

Removes the tooltip from the pagination button is hasNext or hasPrevious is false
tooltip

How to 🎩

🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines

Copy-paste this code in playground/Playground.tsx:
import React from 'react';
import {Page, Pagination} from '../src';

export default function Playground() {
  return (
    <Page title="Playground">
      <Pagination
        hasPrevious
        previousKeys={[74]}
        previousTooltip="j"
        onPrevious={() => {
          console.log('Previous');
        }}
        hasNext
        nextKeys={[75]}
        nextTooltip="k"
        onNext={() => {
          console.log('Next');
        }}
      />
    </Page>
  );
}

🎩 checklist

@BPScott BPScott temporarily deployed to polaris-react-pr-1963 August 14, 2019 13:05 Inactive
@dleroux dleroux force-pushed the 668-disabled-tooltip branch from 7a464f7 to be21e03 Compare August 14, 2019 13:06
@BPScott BPScott temporarily deployed to polaris-react-pr-1963 August 14, 2019 13:06 Inactive
@dleroux dleroux requested review from chloerice and dpersing August 14, 2019 13:07
@dleroux dleroux changed the title [WIP] [Pagination] Remove Tooltip on disabled pagination buttons [Pagination] Remove Tooltip on disabled pagination buttons Aug 14, 2019
@dleroux dleroux changed the title [Pagination] Remove Tooltip on disabled pagination buttons [Pagination] Remove Tooltip on disabled Pagination buttons Aug 14, 2019
Copy link
Member

@chloerice chloerice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code and tophat 👀 solid 🎉 :shipit:

@BPScott BPScott requested a deployment to polaris-react-pr-1963 August 14, 2019 23:24 Abandoned
@dleroux dleroux merged commit 720febb into master Aug 14, 2019
@dleroux dleroux deleted the 668-disabled-tooltip branch August 14, 2019 23:36
@dleroux dleroux temporarily deployed to production September 3, 2019 14:21 Inactive
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

Successfully merging this pull request may close these issues.

[Pagination] Disable buttons trigger onPrevious/onNext when using the keys and render the tooltips

3 participants