小编Ali*_*ita的帖子

不要使用 React-Select 清除选择上的输入

这个问题没有很好的答案,所以我来回答一下:

问题是,如果您想使用 React-Select 并且您想要持久的输入值,该值在选择或模糊时不会被清除。目前组件内不支持此功能,因此需要解决方法。

我还就该主题提出的几个问题之一回答了这个问题 https://github.com/JedWatson/react-select/issues/588
https://github.com/JedWatson/react-select/issues/3210

javascript reactjs react-select

7
推荐指数
2
解决办法
9927
查看次数

收到笑话:序列化为同一字符串

开玩笑地说,出于某种原因,你会得到类似的东西

expected: "test"
received: serializes to the same string
Run Code Online (Sandbox Code Playgroud)

如果你这样做.toContainEqual

expected: "test"
received: "test"
Run Code Online (Sandbox Code Playgroud)

这似乎只发生在将 mongoose 与 jest 一起使用时,但我认为问题与 uriEncoding 和解码有关

javascript mongoose node.js jestjs

4
推荐指数
1
解决办法
2万
查看次数

复合github动作,自动cd到actions目录?

我正在尝试设置一个 github 操作机器人,该机器人在操作运行时使用合成来构建。值得注意的是,这不是必需的,而且我知道 ncc 也会实现同样的目标,但我很好奇是否有可能以可持续的方式实现这项工作。

对于某些上下文,我正在尝试使用 yaml 脚本运行我的alita-moore/EIP-Bot私人操作...

name: "Auto Merge EIP"
description: "A bot that lints EIP edits, finds common errors, and can auto-merge"
inputs:
  GITHUB-TOKEN:
    description: |-
      The Github token to be used by this bot when merging, posting comments, or requesting reviewers
    required: true
  VERSION:
    description: version of the action; this is required because of how actions work
    required: true

runs:
  using: "composite"
  steps:
    - run: cd /home/runner/work/_actions/alita-moore/EIP-Bot/${{ inputs.VERSION }} && npm ci && npm run …
Run Code Online (Sandbox Code Playgroud)

github-actions

1
推荐指数
1
解决办法
5806
查看次数