Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 11:45
    netlify[bot] commented #19296
  • 11:45
    netlify[bot] commented #19296
  • 11:45
    pr-triage[bot] labeled #19296
  • 11:45
    pr-triage[bot] labeled #19296
  • 11:45
    jakubknejzlik opened #19296
  • 11:45
    jakubknejzlik opened #19296
  • 11:12
    olivewind edited #148
  • 11:09
    codecov[bot] commented #19295
  • 11:09
    codecov[bot] commented #19295
  • 11:09
    netlify[bot] commented #19295
  • 11:09
    netlify[bot] commented #19295
  • 11:08
    codecov[bot] commented #19295
  • 11:08
    codecov[bot] commented #19295
  • 11:08
    codecov[bot] commented #19295
  • 11:08
    codecov[bot] commented #19295
  • 11:08
    codecov[bot] commented #19295
  • 11:08
    codecov[bot] commented #19295
  • 11:07
    codecov[bot] commented #19295
  • 11:07
    codecov[bot] commented #19295
  • 11:07
    codecov[bot] commented #19295
Szalai Laci
@szlaci3

@guptapayal Maybe i want to console.log which Leaf of the Tree was clicked. First, i will try this: Let's see what is the info object?

    onSelect = (selectedKeys, info) => {
      console.log(info);
    };

I see many things in that object, one of them is node which refers to the Leaf i clicked. This is node.props:

checked: false
dragOver: false
dragOverGapBottom: false
dragOverGapTop: false
eventKey: "1-0"
expanded: false
halfChecked: false
loaded: false
loading: false
pos: "0-1-0"
title: "Child Node"
...

I think eventKey and info.selected are useful.
I change my console log:

console.log(info.node.props.eventKey + " was clicked, so it's now " + (info.selected ? "selected" : "NOT selected"));

It says 1-0 was clicked, so it's now selected

Polo García
@PoloGarcia
image.png
Hey :wave: I'm looking to implement a behaviour like this in an app I'm developing but can't seem to find the right components
Example extracted from this page: https://ant.design/docs/spec/direct
Have anybody implemented that behaviour, I know that I can build it by hand but maybe there is something already built and I don't need to reinvent the wheel. Thanks in advance :D
Szalai Laci
@szlaci3
@PoloGarcia I can't find such a component, maybe they will implement in the future. If you'll reinvent the wheel, use some of the Form, Input, Tooltip from here : https://ant.design/docs/react/introduce
Szalai Laci
@szlaci3
ant-design-pro-cli VS @ant-design/pro-cli: Same or different?
I have a problem with running the "pro new" command, so I looked deeper. I found that after I installed ant-design-pro-cli globally, in my global npm/node_modules/ant-design-pro-cli there is a package.json with "name": "ant-design-pro-cli". The package.json on github has a slightly different name, "name": "@ant-design/pro-cli":
https://github.com/ant-design/ant-design-pro-cli/blob/master/package.json
The two are treated as different packages on npm.js.com but point to the same github repository.
So the questions are:
Are they one or two packages?
When I install a package using the npm command, do I install what's on npmjs.com or on github? In case the package name or content or version differs.
When I install, should I see the same package.json as it is on github?
Matt Davenport
@mattdavenport
hey all, is anyone successfully using ant.design with apollo + hooks in react? I'm having some issues displaying a Message in the onError callback of the useMutation hook
in particular, I'm getting this error message from React:
←→1 of 2 errors on the page
Unhandled Rejection (Invariant Violation): Objects are not valid as a React child (found: Error: GraphQL error: Authentication Failed). If you meant to render a collection of children, use an array instead
Matt Davenport
@mattdavenport
or more generally, what's the best way to display a Message based on the response of a form submission? all of the examples I find are for simple onClick events
witcherc
@witcherc
Screen Shot 2019-10-16 at 4.18.12 PM.png
anyone know the easies way to adjust width of a list item?
Szalai Laci
@szlaci3
li {
display : block ;
}
@witcherc Try this.
Or maybe you need :
.x-element {
position : absolute ;
right :10px;
}
Where x-element is the "x" delete button.
Szalai Laci
@szlaci3
And add this (make the parent of x-element have relative position, so the x-element top will be at parent's top and not the window top):
li{
position : relative ;
}
witcherc
@witcherc
yes! Thank you! first request in this chat and an immediate fix, you all are angels!
Szalai Laci
@szlaci3
It was fun
witcherc
@witcherc
so, i thought it fixed it but longer comments are screwing it up. it looks like it has to do with the flex-grow and flex-shrink settings of meta-content and list items. thoughts?
Szalai Laci
@szlaci3
You applied absolute, 10px and relative. Right? Can you screenshot the longer comments for me?
axlivan
@axlivan
Hello, World!
Szalai Laci
@szlaci3
Hello, human
axlivan
@axlivan
hahahaha
Leo Wang
@leowang199303
。。。
...
axlivan
@axlivan
you guys have any project where you use ant?
Szalai Laci
@szlaci3
yes
axlivan
@axlivan
can i see?
Szalai Laci
@szlaci3
no
axlivan
@axlivan
no link?
Szalai Laci
@szlaci3
I mean, i'm working on an Ant project.. But
It's not for public view and it's not very advanced yet
Leo Wang
@leowang199303
Do u have a big face?
Matt Davenport
@mattdavenport
in case there are others in here today, anyone know of a decent way to trigger a Message on a form requests 'onComplete'?
axlivan
@axlivan
Good morning
Szalai Laci
@szlaci3
Aha, so you live in Asia
axlivan
@axlivan
yeah
Leo Wang
@leowang199303
it seems Japanese
Szalai Laci
@szlaci3
His name sounds Russian for me. Ivan?
co2nut
@co2nut
hi guys
axlivan
@axlivan
@szlaci3 it's an american name
Szalai Laci
@szlaci3
So did you go from America to Japan?
axlivan
@axlivan
@szlaci3 no hahaha. i live here in the philippines. i'm named after Axl Rose (American Singer)
Szalai Laci
@szlaci3
November Rain, Don't Cry, Knocking on the Heaven's Door
axlivan
@axlivan
@szlaci3 is this your main github acc?
Szalai Laci
@szlaci3
Yes. I'm not so active on github
Leo Wang
@leowang199303
Philippines...
axlivan
@axlivan
@leowang199303 hahaha
Leo Wang
@leowang199303
嗯哼
sorry
enheng